Author: gdp87 | Posted on: 5/10/2010 5:54:03 AM | Views : 412

Hi,
 
I have a simple custom membership provider. And i have a roles table also in my database with 2 roles in, User and admin. I dont think i need to implement the roleprovider as this will be overkill for what i need.
How can i modify the validate user method to route users to one URL and admin to another?
Can i put in a If statement to say If role = admin go here after a user has been validated?
public override bool ValidateUser(string username, string password) { SqlConnection conn = new SqlConnection(_connectionString); try { conn.Open(); string sSQL = "select * from users where U_Name = @username and U_password = @password"; SqlCommand comm = new SqlCommand(sSQL, conn); comm.Parameters.AddWithValue("@username", username); comm.Parameters.AddWithValue("@password&qu ...

Go to the complete details ...