Do more with your ASP.NET Page Template
page 4 of 9
by Sajid Rehman
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 30727/ 72

How do I do it? Session handling

Session handling features can be provided in your Page Template by –

  • Overriding the OnLoad() method in your Page Template class.
  • In the OnLoad() method, do all session checks - e.g. check if user ID is available in the session.
  • If not, then redirect to an error page if the current page is not one of the three
    • The first page of your site
    • The page responsible for setting session variables.
    • The Error page

Advantages

  • Developers need not write repetitive code like validating the user’s session, redirecting incase of timeout/invalid user.

View Entire Article

User Comments

No comments posted yet.

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2021 ASPAlliance.com  |  Page Processed at 2021-03-02 9:04:56 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search