Hello, I had deploy nopcommerce 2.8 with source code into visual studio 2012. There is one thing that I don't understand in login.cshtml file where login button is being triggered by user. The code is written like this:
<fieldset class="form-fields returning-wrapper">
<legend>@T("Account.Login.ReturningCustomer")</legend>
<dl>
@using (Html.BeginForm())
{
<dd class="message-error">
@Html.ValidationSummary(true, T("Account.Login.Unsuccessful").Text)
</dd>
if (Model.UsernamesEnabled)
{
<dt>
@Html.LabelFor(m => m.Username): </dt>
<dd>
@Html.TextBoxFor(m => m.Username, new { @class = "username", autofocus = "autofocus" })
@Html.ValidationMessageFor(m => m.Username)
</dd>
}
else
{
<dt>
@Html.LabelFor(m => m.Email): </dt>
<dd>
@Html.TextBoxFor(m => m.Email, new { @class = "email" , autofocus = "autofocus"})
@Html.ValidationMessageFor(m => m.Email)
</dd>
}
<dt>
@Html.LabelFor(m => m.Password): </dt>
<dd>
@Html.PasswordFor(m => m.Password, new { @class = "password" })
@Html.ValidationMessageFor(m => m.Password)
</dd>
<dd>
@Html.CheckBoxFor(m => m.RememberMe)
@Html.LabelFor(m => m.RememberMe)
</dd>
<dd class="forgot-password">
@Html.RouteLink(T("Account.Login.ForgotPassword").Text, "PasswordRecovery")
</dd>
if (Model.DisplayCaptcha)
{
<dd class="captcha-box">
@Html.Raw(Html.GenerateCaptcha())
</dd>
}
<dd class="buttons">
<input class="button-1 login-button" type="submit" value="@T("Account.Login.LoginButton")" />
</dd>
}
</dl>
</fieldset>
The button does not even link to other pages but magically it works when I try to login as admin. Can someone please explain to me how this work?