Click here to Skip to main content
15,902,114 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:

I'm very new to ASP.NET.
My task is to create a blog with different role's (users,admin), a admin module by checking status in the database (sql server) and vice versa
The database table has 3 columns:

According to the status in the database the page must be redirected to admin page or users page
If status = A  //(admin page)
If status = U  //(users page)

Can any one please help me.. its urgent
Updated 11-Oct-10 22:34pm
DaveAuld 11-Oct-10 15:44pm    
You will learn that anything urgent is only urgent to you, if you need urgent support then you need to pay for a support contract! People are less likely to respond if you put urgent!
shakil0304003 12-Oct-10 11:15am    
Your requirement is unclear & incomplete. You have to create page table & in that table there should be a column to identify which page is for admin or user. If multiple pages are for admin or user then which one you have to redirect. This is totally unclear.

1 solution

Why don't you asked your question clearly? Without proper question you can't get answer. Anyway come to the point.

While login get the status value from database based on user role & store the status value in Session & then redirect to pages based on status value.

Try the sample code for redirections
if(Session["Status"] == "A")
else if(Session["Status"] == "U")
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900