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 3699274
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T05:04:59+00:00 2026-05-19T05:04:59+00:00

I have a MasterPage, in my Views\Shared folder. I have an index.aspx in my

  • 0

I have a MasterPage, in my Views\Shared folder. I have an index.aspx in my Views\Home folder. And I have a login.ascx (user control) in my Views\User folder. The ascx file is added to my MasterPage:

<% Html.RenderPartial(@"~\Views\User\login.ascx");%>

The code in the ascx is pointing the submit form to a UserController.cs in my Controllers folder.

Here’s the ascx:

<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BudgieMoneySite.Models.SiteUserLoginModel>" %>
<% using (Html.BeginForm("UserLogin", "User"))
   {%>
<table width="300">
    <tr>
        <td colspan="3" align="center">
            User Login
        </td>
    </tr>
    <tr>
        <td align="right">
            <%=Html.LabelFor(m => m.Username)%>
        </td>
        <td>
            <%=Html.TextBoxFor(m => m.Username)%>
        </td>
        <td>
        </td>
    </tr>
    <tr>
        <td align="right">
            <%=Html.LabelFor(m => m.Password)%>
        </td>
        <td>
            <%=Html.PasswordFor(m => m.Password)%>
        </td>
        <td>
        </td>
    </tr>
    <tr>
        <td>
        </td>
        <td>
            <%=Html.CheckBoxFor(m => m.RemeberMe)%><%=Html.LabelFor(m => m.RemeberMe)%>
        </td>
    </tr>
    <tr>
        <td colspan="2">
        </td>
        <td colspan="3" align="right">
            <input id="Submit1" type="submit" runat="server" value="Login" />
        </td>
    </tr>
</table>
<%
   } // End Using.%>

If I ctrl+click the Controller name and the method, in the Html.BeginForm area, it takes me to my method that should be called when I click Sybmit.

The method that this should call, in my UserController, has this code defined:

        [HttpPost]
    public ActionResult UserLogin(SiteUserLoginModel model)
    {
        try
        {
            if (MembershipService.ValidateUser(model.Username, model.Password))
            {
                FormService.SignIn(model.Username, model.RemeberMe);
                PersonDto  user = SiteUserLoginModel.LoadLoggedInUserDetails(model.Username);
                Session.Add("current_firstname", user.Firstname);
                Session.Add("current_userid", user.PersonId);
            }
            return RedirectToAction("Index", "Home");
        }
        catch (ArgumentException e)
        {
            ViewData["ErrorMessage"] = e.Message;
            return RedirectToAction("Index", "Home");
        }
    }

However, when I click the submit button at runtime, this method is never called. The screen just refreshed. The HomeController does fire though, as the index screen is refreshed, I think. But the breakpoint in my method above never fires.

What am I doing wrong?

  • 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-19T05:04:59+00:00Added an answer on May 19, 2026 at 5:04 am

    Guys, I found the issue, and it’s an issue I had 2 weeks back, but totoally forgot. The master page had a Form tag! And the user control’s Form tage was being hidden by the master page’s one. I remove the Form tags from the master page, and it’s resolved.

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

Sidebar

Related Questions

I have a partial Sidebar added to the master page (Layout) and inside this
I am using ASP.NET MVC2 application in C#. I have two HTML forms on
I have been trying to organise my views to optimize load times by having
I want to use MVC views to create the body for an email and
I have a menu with several buttons. When i press the first button it
We have a web application written in ASP.NET for .NET 3.5, using standard web
Wondering if someone could help with with some Spring.net IOC integration into a .aspx
I'm, using MVC to develop a Web application, and I need to use nested
As a follow on from one of my previous posts ( ASP.NET MVC2 Master

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.