TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
saifullah khan
NA
335
300.9k
session
Jun 24 2011 6:27 AM
i have created a webpage. i want that before entering in that page session should check that what is the role of user that is admin or user. i have put the following condition.
protected void Page_Load(object sender, EventArgs e)
{
if (Session["Role"].ToString = "User")
{
Response.Redirect("Dataentry.aspx");
}
else
Response.Redirect("ControlPannel.aspx");
}
But it gives me the following error:
The name 'Session' does not exist in the current context
i have also used Session("Role") but gives the same error.
please tell me what is the problem.
Reply
Answers (
4
)
Showing signin after signout when we click on back button
Are all the CSS and HTML webtemplates (1024* 768 ) width=1024px and height=768px which are freely available on net