使用单一登录页面访问4个不同页面 [英] With Single login page access 4 different pages

查看:82
本文介绍了使用单一登录页面访问4个不同页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在做Web应用程序,其中有1个登录页面和分别名为A,B,C,D的4个不同页面.在所有4个页面中,它都具有添加按钮,用户可以通过该按钮单击任何特定按钮,然后应首先将其重定向到工作正常的登录页面,但是当用户输入有效的用户名和密码时,如果重定向至登录页面,则应将其重定向至页面用户点击了页面(A,B,C,D).
如何为此编写代码.
请帮助.
感谢Advance.

Hi,
I am doing web application in which it has 1 login page and 4 different pages named A,B,C,D respectively. in all 4 pages it has add button by which user click on any particular button then it should first redirect to login page that''s working fine but when it redirects to login page when user enters valid username and password it should redirect to page whichever user has clicked on page(A,B,C,D).
How to do code for that.
Plz help.
Thanks Advance.

推荐答案

使用表单身份验证

并尝试这个
FormsAuthentication.RedirectFromLoginPage(您的字符串,false);
Use Forms Authentication

and try this
FormsAuthentication.RedirectFromLoginPage(Your string, false);


if(struserclicked == ''A'') 
{
  Response.Redirect("A.aspx");
}
else if(struserclicked == "B")
{
  Response.Redirect("B.aspx&");
}
else if(struserclicked == "C")
{
  Response.Redirect("C.aspx");
}
else if(struserclicked == "D")
{
  Response.Redirect("D.aspx");
}


这篇关于使用单一登录页面访问4个不同页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆