BONJOUR,
je voudrai faire une redirection par rapport au profil
profil x = page1
profil y = page2
merci mes amis
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsCallback || !Page.IsPostBack)
{
}
}
protected void Login_Click(object sender, EventArgs e)
{
AppConfig conf = AppConfig.createFromDefaultFile();
String user = Request.Params["txtUser"];
String pwd = Request.Params["txtPwd"];
if (conf.checkUserPassword(user, pwd))
{
string sessionId = Session.SessionID;
string token = conf.saveToken(user, sessionId);
string profil = conf.getUserProfil(user);
Session["USER"] = user;
Session["TOKEN"] = token;
Session["PROFIL"] = profil;
}
else
{
Session["USER"] = "";
Session["TOKEN"] = "";
Session["PROFIL"] = "";
Response.Redirect("page1?msg=bad_login");
}
}
protected void Logout_Click(object sender, EventArgs e)
{
BNDGTools.AppConfig.deleteToken((string)Session["TOKEN"]);
Session["USER"] = "";
Session["TOKEN"] = "";
Session["PROFIL"] = "";
Response.Redirect("page1.aspx");
}
protected void Button1_Click(object sender, EventArgs e)
{
}
protected void Login_Click(object sender, ImageClickEventArgs e)
{
}
}