asp.net管理系统给客户分配不同的账号,客户登陆后跳转到不同的页面

0123用户类型是跳转到同一页面的,用panel控件隐藏,4和5要跳转到新的页面A.aspx和B.aspx.现在只能跳转到C.aspx页面,怎么更改代码才让能让4跳转到A.aspx,5跳转到B.aspx呢,菜鸟求教...
protected void Page_Load(object sender, EventArgs e)
{
if (Session["userType"] != null)
{
// Response.Write(Session["userType"].ToString());
if (Session["userType"].ToString().Trim()=="0")
{
//PanelAdmin.Visible = false;
}
if (Session["userType"].ToString().Trim() == "1")
{
PanelSuper.Visible = false;
}
if (Session["userType"].ToString().Trim() == "2" || Session["userType"].ToString().Trim() == "3" || Session["userType"].ToString().Trim() == "4" || Session["userType"].ToString().Trim() == "5")
{
PanelSuper.Visible = false;
PanelAdmin.Visible = false;
}
HiddenFieldK.Value = FormsAuthentication.HashPasswordForStoringInConfigFile(Session["userType"]+"ty2010", "MD5");
HiddenFieldU.Value = Session["userType"].ToString();
HiddenFieldI.Value = Session["userID"].ToString();
}
else {
Response.Redirect("/Login.html");
}
--------------------------------------
function doLogin()
{
$.ajax({
url: "LoginHandler.ashx?t="+Math.random(),
global: false,
type: "POST",
data: ( { login: $("#login").val(), password:$("#pwd").val()}),
async:false,
success: function (msg)
{
if (msg == 'true')
{
window.location = "C.aspx";
} else
{
alert("登陆失败!"); }

},
error:function(errmsg,textStatus)
{
alert("无法登陆!");
}
});
}

放到最前面
if (Session["userType"].ToString().Trim()=="4")
{
//跳转
}
if (Session["userType"].ToString().Trim()=="5")
{
//跳转
}
温馨提示:答案为网友推荐,仅供参考

相关了解……

你可能感兴趣的内容

大家正在搜

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网