the name of God and Hi to you I created some login pages in asp.net i want use SHA-1 algoritm for my passwords, it's mean, controller get password then send to SHA-1 function and then save it to db. first: I have these cods in cshtml

<input type="text" name="Username" required="required" />
                    <label for="Username">Username</label>
                <div>
                    <input type="password" name="Password" required="required"/>
                    <label for="Password">Password</label>
                </div>
                <div type="submit" class="button-container">
                    <button><span>Go</span></button>
                </div>

after submit username and pass will be checked and if those be true an new page will be open and user login happen successfully but I don't have any idea about to show my login happened, let explain it whit a sample I submit my login page and then this page will be open :http://localhost:19926/Home/Home because I used these codes(%1)

in html:
@using (Html.BeginForm("webAdminAccess", "Authentication")){

...myhtml codes...}

in controller:

public ActionResult webAdminAccess(string Username, string Password)
    {
        if (mLO.webAdminAccess(Username, Password))
        {
            return RedirectToAction("Home", "Home");
        }
        else
        {
                return View("webAdminAccessWrong");
        }
    }

and there is no difference if I run my project in visual and I put this link http://localhost:19926/Home/Home in my brower(%2)

now let me ask my question:

how make a difference between these two?(%1,%2)

what is Characteristic or Proprietary of a page that was open whit a login? how make a difference between login as admin or login as client? (I have admin class, authenticationController and use my sql) tnx for you help

Related posts

Recent Viewed