| Article: |
Enhancing ASP.NET Pages with JavaScript | |
| Subject: | Problem with Page.RegisterStartupScript | |
| Date: | 2005-03-23 22:45:28 | |
| From: | vishalvishal | |
|
Hi,
|
||
Showing messages 1 through 3 of 3.
-
Problem with Page.RegisterStartupScript
2006-06-27 04:35:50 ROCK007 [Reply | View]
Hi All,
Another same alike query. When we add a Page.RegisterStartupScript and try to browse to another page from the current page (where this javascript is written), we get a message saying "Do you really want to navigate from the current page?" since we have used window.BeforeUnload to halt when some values are changed. Even though we have clicked "Cancel" button to avoid going out of the page, it stays back but after clicking the "save" button it does not fires the "Button_Click" event handler. This Button click handler works with the normal case.
What should be done to drap the Button_Click event in such case?
ThanX




if(!Back)
page.RegisterStartupScript("name",name)