Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [WebMethod]
- public string login(string username, string password)
- {
- string user1 = "admin";
- string pass1 = "1234";
- string user2 = "mehul";
- string pass2 = "12345";
- string user3 = "shubham";
- string pass3 = "shubham";
- string result;
- if ((user1.Equals(username)) && (pass1.Equals(password)))
- {
- result = "granted";
- System.Web.HttpContext.Current.Response.Redirect("http://mehul05.azurewebsites.net/mehul.aspx");
- return result;
- }
- else if ((user2.Equals(username)) && (pass2.Equals(password)))
- {
- result = "granted";
- System.Web.HttpContext.Current.Response.Redirect("http://mehul05.azurewebsites.net/mehul.aspx");
- return result;
- }
- else if ((user3.Equals(username)) && (pass3.Equals(password)))
- {
- result = "granted";
- System.Web.HttpContext.Current.Response.Redirect("http://mehul05.azurewebsites.net/mehul.aspx");
- return result;
- }
- else
- {
- result = "denied";
- return result;
- }
- }
Add Comment
Please, Sign In to add comment