'Write in module1.vb, can be built by any page to create, test through' PCSKY http://blog.9cbs.net/lee2001XPASP, you can also write in .NET. , Do not recommend <% IF session ("UserName") <> "" "Login.aspx") End IF%> ASP.NET Writings, placed in module1.vbmodule module1sub checkuser () "Check User Information If httpcontext.current.Session ("Username") = "" "" "Login.aspx") end ifnd suend module is added to the page you need to verify: Private SUB Page_Load (Byval Sender AS System.Object, Byval e as system.eventargs Handles mybase.load call checkuser () 'Check the login information End Sub Advantages: 1. Implement the separation of pages and code, improve performance 2. Code standardization, use global processes, reduce code redundancy The balance is relatively simple, I hope everyone can throw the jade! ^ _ ^