What is the best way to open a window.showModalDialog with a link button when updating a form?
I have a link button on my form that updates data. When the client's status becomes active, I want to open a window for additional information entry.
Public Function OpenWindowRequest(ByVal URL As String) As String
If accountMode = "1" Then
Return "window.showModalDialog('" & Page.ResolveUrl(Server.UrlEncode(URL)) & "', window,'resizable:yes; scroll:on; status:yes; dialogWidth:750px; dialogHeight:350px; center:yes');"
Else
accountMode = ""
Return ""
End If
In my aspx file, I have:
<asp:LinkButton id="UpdateButton" runat="server" commandName="Update" Text="Update" OnClientClick='<%# OpenWindowRequest("myurl.aspx") %>'></asp:LinkButton>
I also attempted calling the OpenWindowRequest function on the FormUpdating event, but unfortunately, the window does not open.