This is a headache. You cannot access the page after opening the form to display the page. Session Value. It may be IIS The service treats the new form as a new connection and reallocates it. Session Session. In this case, a special form opening method is used, and the project is hit. Opening a form in case of a problem : First Showmodaldialog A mode form, and then in the mode form Open A form, the page opened at this time cannot access the previously set Session Value. If you use Showmodaldialog Or Open Open does not exist.
RelatedCode
Default. aspx
Protected VoidPage_load (ObjectSender,EventargsE)
{
Session ["Henry"] ="BBQ";
ShowmodaldialogShow =New Showmodaldialog("Open. aspx","Default2.aspx");
Registerscript. Regionclick (linkbutton1, show,New Notpost());
}
Default2.aspx
Protected VoidPage_load (ObjectSender,EventargsE)
{
Response. Write (session ["Henry"]);
OpenWindowOpen =New OpenWindow("Default2.aspx");
Registerscript. Regionclick (linkbutton1, open,New Notpost());
}
When you clickDefault2.aspxButton to open againDefault2.aspCannot output the originalSession.
I can't find any solutions, so I will ask you to help me on the homepage.