页面从登录页面重定向 [英] page Redirection from Login page

查看:90
本文介绍了页面从登录页面重定向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的登录页面包含USERNAME和PASSWORD标签。另外我有三个用户名和特定密码......还有三个不同的Menupage(如MENU1,Menu2,MENU3)



我的问题是 - 什么我想要的是,登录页面根据用户名和密码重定向到不同的menupage ...



当前场景: - 对于所有用户名和密码,它只显示menu1页面...





i编程编码的新功能... plz建议我使用正确的代码....

解决方案

HI



尝试根据登录的凭证构建动态菜单。

尝试通过使用基页和主页面获取用户详细信息,同时构建菜单应用菜单所需的验证。

这对你有帮助。


HI试试这样吧,



  string  userName = txtUserName.Text.Trim(); 
string password = txtPassword.Text.Trim();
if (userName == aaa && password == 123
Response.Redirect ( MenuPage1.aspx);
else if (userName == bbb&& password == 456
Response.Redirect( MenuPage1.aspx) ;
else if (userName == ccc&& password == 789
Response.Redirect( MenuPage1.aspx) ;


i have login page with tags USERNAME and PASSWORD. Also i have three username and there specific passwords...and also i have three different Menupage's(like- MENU1,Menu2,MENU3)

my question is-- what i want is , that the login page redirect to different menupage's according to their username and password...

current scenario:-- for all the username and password, it shows only menu1 page...


i am new in programming coding...plz suggest me the right code....

解决方案

HI

Try to built a dynamic menu based on the logged in credential.
Try to get User details by using base page and in master page while constructing the menu apply the required validations for the menu .
This will help You .


HI Try like this,,

string userName = txtUserName.Text.Trim();
           string password = txtPassword.Text.Trim();
           if (userName == "aaa" && password == "123")
               Response.Redirect("MenuPage1.aspx");
          else if (userName == "bbb" && password == "456")
               Response.Redirect("MenuPage1.aspx");
          else if (userName == "ccc" && password == "789")
               Response.Redirect("MenuPage1.aspx");


这篇关于页面从登录页面重定向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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