Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Calling a javascript function from a modal window in vb.net

I want to calling a javascript function from a asp.net modal window using vb. The javascript function is to close the same modal window.

The function I want call is: function CloseModalWindow(winName)

I tried

Page.ClientScript.RegisterStartupScript  

but that does not work. How can I do that from vb.net code behind?

like image 218
DNR Avatar asked Oct 10 '22 04:10

DNR


1 Answers

If you are looking to close a modal window, perhaps place a label on the aspx side, and then use a label with similar to:

<a href="javascript:CloseModalWindow('ThisWindow')"><asp:Label runat="server" Text="Close Me"></Label></a>  

HTH

like image 63
Troy Avatar answered Oct 17 '22 22:10

Troy