LinkButton + showmodaldialog not working
- by CPM
What would be the west way to open a window.showModalDialog on linkbutton when updating a form?
I have a linkbutton on form that allows me to update the data, I want to be able to check if the data updatedin this case , parameter status of client is active I want to be able to open a window to fill some more information.
Public Function OpenWindowRquest(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
On aspx side I have
<asp:LinkButton id="UpdateButton" runat="server" commandName="Update" Text="Update" OnClientClick='<%# OpenWindowRequest("myurl.aspx") %>'></asp:LinkButton>
I also tried to call the function OpenWindowRequest on FormUpdating event but it doesnt work, window is not opened.