title: Redirect Admin to different page and User to different Page
body: <pre><code>SqlConnection con= new SqlConnection(ConfigurationManager.ConnectionStrings["con"].ConnectionString);
          con.Open();
          SqlCommand cmd = new SqlCommand("select * from login where Email =@username and Password=@password and Activated_User=1 and User_Type=1", con);
          cmd.Parameters.AddWithValue("@username", Login1.UserName);
          cmd.Parameters.AddWithValue("@password", Login1.Password);
          SqlDataAdapter da = new SqlDataAdapter(cmd);
          DataTable ds = new DataTable();
          da.Fill(ds);
  
          if (ds.Rows.Count &gt; 0)
          {            
                  Session["UID"] = Login1.UserName;
                  Response.Redirect("dashboard.aspx");
  
          }
          else
          {
              ClientScript.RegisterStartupScript(Page.GetType(), "validation", "&lt;script language='javascript'&gt;alert('Invalid Username and Password')&lt;/script&gt;");
          }
  </code></pre>
  
  <p>Hi I am new to .NET
  Above code is for LOGIN page.
  I want to redirect Admin and user to different pages respectively(dashboard.aspx and user-dashboard.aspx).
  User_Type=1 means Admin and if it is 2 then it means USER.</p>