asp.net - PageLoad event is not fired when an aspx is opened through javascript of another aspx page -


i have aspx application 2 aspx pages. second aspx page opened on click of button in first aspx page using javascript. problem is, when second aspx page getting opened, page_load event not firing. when refresh second page, page_load event of second aspx page fired.

please let me know might problem , done fire page_load event.

thanks in advance

in case (calling aspx page window.open()) have attach page_load event manually in page's oninit event:

override protected void oninit(eventargs e) {     this.load += new eventhandler(page_load);     base.oninit(e); }  protected void page_load(object sender, eventargs e) {   // code here  } 

reference: http://www.vbforums.com/showthread.php?t=249689


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -