Posted on: 9/29/2014 7:22:56 AM | Views : 492

Below is my code .I have 3 columns in my database i.e 'UserName','Password','UserType'
What I want to do is :  if the usertype='admin' it will redirect to..aaa.aspx
                                 if the usertype='user' it will redirect to..bbb.aspx
public partial class login : System.Web.UI.Page { SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["str"].ConnectionString.ToString()); protected void Page_Init(object sender, EventArgs e) { this.btnLogin.Click += new System.EventHandler(this.btnLogin_Click); } protected void Page_Load(object sender, EventArgs e) { } private bool ValidateUser(string userName, string passWord) { SqlCommand cmd; s ...

Go to the complete details ...