我在更新面板中有一个按钮。当我点击按钮时,它没有点击服务器端点击方法。不确定发生了什么。以下是你们的代码。对可能发生的事情的任何见解都会有很大帮助。按钮的ID是btnPost。它是下面更新面板的一部分。
Protected Sub btnPost_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnPost.Click
Dim sErrMsg As String = String.Empty
If CStr(Session(Common.Session.UserName)) = String.Empty Then
Response.Redirect("~/ErrorInfo.aspx?mes=Your session has expired. Please search the deal again", False)
Else
If Not ValidatePost(sErrMsg) Then
Me.DispMessage(sErrMsg)
Else
Try
If ValidateandSaveGrid() = True Then
SaveHoldBackAloc()
SaveEmpAlloc()
SavePaymentLog()
ConfigureAfterPost()
getHoldbackHistory()
Else
Me.DispMessage("Invalid Data")
End If
Catch ex As Exception
End Try
End If
End If
End Sub
以下是Button Post Back事件: -
{e:df[e].unique() for e in df.columns}
答案 0 :(得分:1)
您已经看到为按钮添加了一个属性
OnClick="btnPost_Click"
它应该是这样的:
<asp:Button ID="btnPost" runat="server" Text="Post" OnClick="btnPost_Click" Width="76px" TabIndex="15" />