Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9021497
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T05:16:10+00:00 2026-06-16T05:16:10+00:00

I have problem that in my MVC 3 project, the logon view do not

  • 0

I have problem that in my MVC 3 project, the logon view do not show although i inspected my html file and there are html elements but they do not show. Please have a look, and give me some suggestion to solve this.

Here is my view :

<!DOCTYPE html>

<html>
<head>
    <title>LogOn</title>
    <link href="@Url.Content("~/Content/Admin/css/reset.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/Admin/css/CMSS.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Content/Admin/scripts/jquery-1.6.1.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Content/Admin/scripts/modernizr-1.7.min.js")" type="text/javascript"></script>
</head>
<body>
    <div class="error-container"></div>
<div id="login-wrapper">
    <div class="background">
    <h3>
        <span class="title">CMS</span></h3>
    <div class="form">
        <p class="seperation"></p>
        @using (Html.BeginForm())
        {
            @Html.ValidationSummary(true)
            <table>
                <col class="col-title" />
                <col class="col-value" />
                <tr>
                    <td>@Html.LabelFor(model => model.UserName)</td>
                    <td>
                        @Html.EditorFor(model => model.UserName)
                        @Html.ValidationMessageFor(model => model.UserName)
                    </td>
                </tr>
                <tr>
                    <td class="login-title">@Html.LabelFor(model => model.Password)</td>
                    <td>
                        @Html.EditorFor(model => model.Password)
                        @Html.ValidationMessageFor(model => model.Password)
                    </td>
                </tr>
                <!--<tr>
                        <td colspan="2">
                            <asp:CheckBox ID="cbxRemember" runat="server" Text="Ghi nhớ" />
                        </td>
                    </tr>-->
                <tr>
                    <td></td>
                    <td>
                        <input type="submit" value="Log On" />
                    </td>
                </tr>
            </table>
        }
    </div>

        @if (Model.EnablePasswordReset)
        {
             <p class="forgot-links">
            <a id="forgot-pass">@Html.ActionLink("Forgot Password?", "ForgotPassword")</a></p>
        }
    </div>
    <p class="shadow">
    </p>
    <p class="copyright">
        <span class="copy">© 2011 CMS. All Rights Reserved.</span>
    </p>

    @{Html.RenderAction("ForgotPassword", "Account");}

</div>
<div class="overlay"></div>
</body>
</html>

here is my controller :

[HttpGet]
        public virtual ActionResult LogOn()
        {
            var viewModel = new LogOnViewModel();
            return View(viewModel);
        }

        [HttpPost]
        public virtual ActionResult LogOn(LogOnViewModel model, string returnUrl)
        {
            if (ModelState.IsValid)
            {
                MembershipUser user = membershipService.GetUser(model.UserName);
                var role = roleService.GetRolesForUser(user.UserName);
                if (authenticationService.LogOn(model.UserName, model.Password, false)) // in CMS do not for remember user for security
                {
                    if (Url.IsLocalUrl(returnUrl) && returnUrl.Length > 1 && returnUrl.StartsWith("/")
                        && !returnUrl.StartsWith("//") && !returnUrl.StartsWith("/\\"))
                    {
                        return Redirect(returnUrl);
                    }
                    else
                    {
                        if (IsAdministrator(role))
                        {
                            return RedirectToAction("Index", "Dashboard", new { area = "Admin" });
                        }
                        return RedirectToAction("Index", "Account");
                    }
                }
                else
                {

                    if (user == null)
                    {
                        ModelState.AddModelError("", "This account does not exist. Please try again.");
                    }
                    else
                    {
                        if (!user.IsApproved)
                        {
                            ModelState.AddModelError("", "Your account has not been approved yet.");
                        }
                        else if (user.IsLockedOut)
                        {
                            ModelState.AddModelError("", "Your account is currently locked.");
                        }
                        else
                        {
                            ModelState.AddModelError("", "The user name or password provided is incorrect.");
                        }
                    }
                }
            }

            // If we got this far, something failed, redisplay form
            return RedirectToAction("LogOn");
        }

and the result i got from Firefox :

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T05:16:11+00:00Added an answer on June 16, 2026 at 5:16 am

    Thanks for the comments, i found out the issue. It Caused by my elements are set display none. I did not check carefully.Thanks again !

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem that I suppose comes from my ASP.NET MVC project using
I have taken on an MVC project that has a view that displays several
In my ASP.NET MVC project I have added a parameters.xml file that looks like:
We have the problem that we have the open project files in our SVN
I have a bizarre routing issue with my ASP.NET MVC project that I hope
I’m working on MVC project and I have to use web forms control there.
I have an Asp.Net MVC project with the typical forms authentication that redirects the
I have a problem, I'm trying to use a helper-class for a MVC project.
I have a MVC project. The views are aspx. I created a view split
I have this ASP.net MVC project that requires a wizard like interface... So I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.