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

  • SEARCH
  • Home
  • 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 732461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T07:08:41+00:00 2026-05-14T07:08:41+00:00

I really need your help for this. I am relatively new to programming and

  • 0

I really need your help for this. I am relatively new to programming and I need help to something that could be easy for a experienced programmer.

I would like to get the login form that we get for free in an MVC application on the left sidebar of my Home index page instead of the usual Account/Login page.

I am facing some problems.

First I need a product object to be displayed on my Home Index page as well.

What I did is that I added a product object to the LogOnModel that they provide in the AccountModels class and I created a UserControl (partial view) copying the content of the LogOn.aspx view. Now my Home index.aspx as well as my partial view inherits the LogOnModel class.

I can see the Login form on my Home Index page as well as my product object BUT the login Form is never empty. The last username and password always appear there.

I know I must have forgotten something or have done something wrong or the way did it is completely wrong !!

Please could you give me some advice
Thks

 <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<CoderForTradersSite.Models.LogOnModel>" %>

<h4>Login Form</h4>
    <p>
        Please enter your username and password. <%= Html.ActionLink("Register", "Register") %> if you don't have an account.
    </p>

    <% using (Html.BeginForm()) { %>
        <%= Html.ValidationSummary(true, "Login was unsuccessful. Please correct the errors and try again.") %>
        <div>
            <fieldset>
                <legend>Account Information</legend>

                <div class="editor-label">
                    <%= Html.LabelFor(m => m.UserName) %>
                </div>
                <div class="editor-field">
                    <%= Html.TextBoxFor(m => m.UserName) %>
                    <%= Html.ValidationMessageFor(m => m.UserName) %>
                </div>

                <div class="editor-label">
                    <%= Html.LabelFor(m => m.Password) %>
                </div>
                <div class="editor-field">
                    <%= Html.PasswordFor(m => m.Password) %>
                    <%= Html.ValidationMessageFor(m => m.Password) %>
                </div>

                <div class="editor-label">
                    <%= Html.CheckBoxFor(m => m.RememberMe) %>
                    <%= Html.LabelFor(m => m.RememberMe) %>
                </div>

                <p>
                    <input type="submit" value="Log On" />
                </p>
            </fieldset>
        </div>
    <% } %> 
  • 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-05-14T07:08:41+00:00Added an answer on May 14, 2026 at 7:08 am

    2 things to consider here..
    1) You didn’t have to mix the product and logon models.. Have the login form in a partial view, and create an action in the Account controller that will return the partial view:

    public ActionResult LogonModule()
    {
        return PartialView();
    }
    

    Then on your Index page, use the following snippet to display the logon panel: <%: Html.RenderAction("LogonModule", "Account") %>
    This way this panel will be completely independant from the main page model. It will add the logon module server-side, so it’s completely transparent to the user.. The generated html is absolutely the same.

    2) You’re saying that the login/password fields are prepopulated. Are you completely sure that it’s not the browser populating these fields? Most browsers do this, and it can lead to a lot of confusion 🙂
    Check the html. If the login and password are not there – then you’re fine ^_^

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

Sidebar

Related Questions

I really need help with interfaces in general... Any resources that you guys would
Afternoon all, I really need your help as this is a Nightmare! I was
I'm new to Java and really need your help. I am presently using a
I really need your help in my issue very quickly and it's too close
I've some questions .. and I really need your help. I have an application.
i really really need your help. I'm successfully setting up a connection to my
i really need you guys your help. I have to do animation on a
I have decided that I really need to get some flowcharts for reverse engineering
I have this requirement that i need to Update/Save all records from DatabaseA on
I am working on a small project and need your help. Here are the

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.