<asp:Label ID="lblPopupTargetID" runat="server" Style="display: none;"></asp:Label>
2. You can assign "lblPopupTargetID" to ModalPopupExtender's TargetControlID property:
<cc1:ModalPopupExtender ID="mpeEditEmployee" runat="server"
TargetControlID="lblPopupTargetID"
PopupControlID="pnlEditCustomer">
</cc1:ModalPopupExtender>
Private Sub gvCustomerList_RowCommand(ByVal sender As Object, _
ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) _
Handles gvCustomerList.RowCommand
If (e.CommandName = "cmdEdit") Then
'Populate ModalPopup content
'Then call Show() to display the popup
Me.mpeEditEmployee.Show()
End If
End Sub
Protected Sub btnSave_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btnSave.Click
'Save changes
'Then call Hide() to close the popup
Me.mpeEditEmployee.Hide()
End Sub
Private Sub gvCustomerList_RowCommand(ByVal sender As Object, _
ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) _
Handles gvCustomerList.RowCommand
If (e.CommandName = "cmdEdit") Then
'Populate ModalPopup content
'Then call Show() to display the popup
Me.mpeEditEmployee.Show()
End If
End Sub
Protected Sub btnSave_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btnSave.Click
'Save changes
'Then call Hide() to close the popup
Me.mpeEditEmployee.Hide()
End Sub
Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.
Comments (1)
Commented: