Click here to Skip to main content
15,891,423 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to redirect my admin to the webpage of data grid view
plz give me some code for that
m waiting
thank you
Posted
Updated 8-Apr-12 6:44am
v2
Comments
Reza Ahmadi 8-Apr-12 13:26pm    
I could not understand. You want to redirect admin to a particular page after logging in or you want to have a particular login page for the admin?
Keyuroz 8-Apr-12 13:45pm    
i have particular login page but after admin login i wat to redirect admin to different page like to show or edit database's data.

Hi,
The easiest way is to use this:
C#
if (HttpContext.Current.User.Identity.Name=="admin")
   Response.Redirect(...)

You can write this code in your Login.aspx page Load event.

Cheers
 
Share this answer
 
Comments
VJ Reddy 8-Apr-12 20:46pm    
+5
Reza Ahmadi 8-Apr-12 23:35pm    
Thanks
after your login code just type Response.redirect code and point it to the page which you wanted to get after login

Thnaks
 
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