I have a very simple question. What command can I use from a ASP.NET sub routine to close a popup window. In JavaScript Self.Close() would work but I can not find any equivilent in ASP.NET.
But how can I combine JavaScript and ASP.NET. I need to update a table which I do with vbscript but I also need to close the window which can only be done in JavaScript. Is there a way to chain the two scripts together.
ok, if I'm following you, you want to do this (tell me if I'm off):
You have a button. When the button is clicked, you want the table to be updated and the window to close.
If this is the scenario, not a problem. Just add this line
Button.Attributes.Add("onClick", "javascript:window.close()"
That takes care of the window closing. Now, in your code behind, just write the code to update the table in the button's _Click sub. Both will fire when the button is clicked.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.