session in asp.net C#
<p>basically i have 3 pages, log in page, main page and registration page.</p>

<p>My users have 2 access level, admin and User.</p>

<p>Admin can go to registration apge, User can't.</p>

<p>On log in page, there are 2 session, Name and Role.</p>

<p>on page load, I clear both session.</p>

<p>If log in is succeeded, I filled in the values.</p>

<p>My problem is..</p>

<p>I log in as Admin, Session["Name"]="admin"; Session["Role"]="Admin";</p>

<p>I go to main page, then to registration page with hyper link. (enable only for admin)</p>

<p>On registration pageload, I check the role. If it is not access, I redirect to main page.</p>

<p>Every page has logged out hyper link.</p>

<p>I will redirect that link to log in page.</p>

<p>As I clear the session values at the loading of log in page, they are all clear.</p>

<p>When I get to Admin page, I copy the URL.</p>

<p>I log out and log in as someone else with User access.</p>

<p>I go to Main page.</p>

<p>I can't go to registraion page as the hyper link is disable.</p>

<p>But when I paste the URL, it can go to registration page.</p>

<p>Only when I click something, it will redirect to main page as the page_load function is not run at the first time.</p>

<p>Any idea?</p>
