Click here to Skip to main content
15,896,154 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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....
Posted
Comments
What have you tried and where is the problem?
vopesh chandra 10-Dec-13 1:51am    
try to login the page with USERNAME and password.. and i have three more XML pages(menu1,menu2,menu3).. i want to do like when i put one usename and password then menu1.xml will be open, when i put second username and password then menu2.xml will be open, respectively..... evrything i want in java,jsp or javascript...(and username and password are validated from database, i am using oracle...

current scenario:-- for all the username and password, after validate from database, it will go to menu1.xml....

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 .
 
Share this answer
 
Comments
vopesh chandra 9-Dec-13 4:58am    
sir i think master page concept belongs to >net technologies.... what i have the page that has been written in java script...

when i put the correct username and password... it will redirect to only one menu page


through this command $('menu').xmenu(url:"scripts/Menu1.xml"}); bcz the file is inside the script folder.

so, for all the usernames, page will redirect to only menu1


what i want is , that the login page redirect to different menupage's according to their username and password..
HI Try like this,,

C#
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");
 
Share this answer
 
v2
Comments
vopesh chandra 9-Dec-13 7:26am    
Thank you kartik, but i dn't want to show username and password here and the files which i needs to redirect are xml file's....
Karthik_Mahalingam 9-Dec-13 7:37am    
can u explain a bit, so that i can suggest more points to clarify your issue.
vopesh chandra 10-Dec-13 2:18am    
try to login the page with USERNAME and password.. and i have three more XML pages(menu1,menu2,menu3).. i want to do like when i put one usename and password then menu1.xml will be open, when i put second username and password then menu2.xml will be open, respectively..... evrything i want in java,jsp or javascript...(and username and password are validated from database, i am using oracle...

current scenario:-- for all the username and password, after validate from database, it will go to menu1.xml....

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900