1. Use Javascript
Add a javascript section to each pageCode:
Function window. onbeforeunload ()
{
If (event. clientx> document. Body. clientwidth & event. clienty <0 | event. altkey ){
Window. Open ("logout. aspx ");
}
}
Because the onbeforeunload method is executed when the browser is closed, refreshed, and the page is adjusted, You need to determine whether you have clicked the close button or pressed alt F4 to perform the true close operation.
Write the same method as session_end in page_load of logout. aspx, and add the event onload = "javascript: window. Close ()" to logout. aspx ()"
But there is still a problem. Javascript may have different behaviors in different browsers, and it is not determined when it is closed through the file->.
Common Web Services
Http://topic.csdn.net/u/20081217/13/5a9075fc-feb1-4cde-96ac-5f982f7a1b7b.html
WAP Binding data <Mobile: link id = "link1" runat = "server" navigateurl = '<% # "A. aspx? Id = "+ databinder. eval (container," dataitem. No "). tostring () %>'
TEXT = "link1"> </Mobile: link>
<Mobile: link id = "link1" runat = "server" navigateurl = '<% # "A. aspx? Id = "+ eval (" no "). tostring () %> '> <% # eval (" name ") %> </Mobile: link>
///
// remove all script code on the page
///
//
//
Public static string filterscript (string content)
{< br> string regexstr = @ ") "; // use boundary restrictions to obtain
return RegEx. replace (content, regexstr, String. empty, regexoptions. ignorecase | regexoptions. singleline);
}
///
// remove HTML elements from HTML
///
//
//
Public static string filterhtml (string content)
{< br> string newstr = filterscript (content);
string regexstr = @ "<[^>] *>";
return RegEx. replace (newstr, regexstr, String. empty, regexoptions. ignorecase);
}