string sql = "select * from " + role.SelectedItem.Value + " where Login='";
sql = sql + user.Text + "' and Password='" + pass.Text + "'";
Conn conn = new Conn();
DataSet ds = conn.OpenDataset(sql);
if (ds.Tables[0].Rows.Count>0)
{
/*
Response.Cookies["U"].Value = user.Text;
Response.Cookies["U"].Expires = DateTime.Now.AddDays(2);
Response.Cookies["R"].Value = role.SelectedItem.Value;
Response.Cookies["R"].Expires = DateTime.Now.AddDays(2);
Response.Cookies["I"].Value = ds.Tables[0].Rows[0][0].ToString();
Response.Cookies["I"].Expires = DateTime.Now.AddDays(2);
*/
Session["U"] = user.Text;
Session["R"] = role.SelectedItem.Value;
Session["I"] = ds.Tables[0].Rows[0][0].ToString();
Response.Redirect(role.SelectedItem.Value + "/Main.aspx");
}