Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using System.Configuration;
- namespace LoginVjezba
- {
- public partial class _Default : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- if (User.Identity.IsAuthenticated == true)
- {
- Response.Redirect("~/home.aspx");
- }
- }
- protected void AutentificateLoginKorisnik(object sender, AuthenticateEventArgs e)
- {
- if (this.LoginKorisnik.UserName == ConfigurationManager.AppSettings["username"] &&
- this.LoginKorisnik.Password == ConfigurationManager.AppSettings["password"])
- {
- e.Authenticated = true;
- }
- else
- {
- e.Authenticated = false;
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment