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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T03:32:13+00:00 2026-05-16T03:32:13+00:00

I’ve created a simple .NET usercontrol for logging into a members area on a

  • 0

I’ve created a simple .NET usercontrol for logging into a members area on a website (the site is powered by Umbraco and uses their membership provider).

It worked fine until I changed the submit button on the log-in usercontrol to an imagebutton. Now it doesn’t seem to submit anything – it just reloads the page when clicked and doesn’t log the user in.

At the moment, the control is just being inserted as a standard .aspx usercontrol, without being compiled into a DLL – which worked with the standard submit button but doesn’t with the imagebutton. I’m thinking that to get an imagebutton working requires a code-behind page, hence I need to compile it. Is this right?

I’m a total noob at .NET as you can probably tell, so any advice would be great.

Here’s the code I have now:

<%@ Control Language="C#" AutoEventWireup="true" %>
<asp:Login ID="Login1" runat="server">
    <LayoutTemplate>
        <fieldset>
            <legend>Log in details</legend>
            <div>
                <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">User Name:</asp:Label>
                <asp:TextBox ID="UserName" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" 
                    ControlToValidate="UserName" ErrorMessage="User Name is required." 
                    ToolTip="User Name is required." ValidationGroup="ctl00$Login1">*</asp:RequiredFieldValidator>
            </div>
            <div>
                <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password:</asp:Label>
                <asp:TextBox ID="Password" runat="server" TextMode="Password"></asp:TextBox>
                <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" 
                    ControlToValidate="Password" ErrorMessage="Password is required." 
                    ToolTip="Password is required." ValidationGroup="ctl00$Login1">*</asp:RequiredFieldValidator>
            </div>
            <div>
                <asp:CheckBox ID="RememberMe" runat="server" Text="Remember me next time." />
            </div>
            <div>
                <asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal>
            </div>
        </fieldset>

        <asp:ImageButton ID="LoginButton" runat="server" src="~/css/img/btn_log-in.png" CssClass="rollover" ValidationGroup="ctl00$Login1" />

        <br />
        <br />
        <div style="background: #fc0">STATUS (to be removed) <asp:LoginStatus ID="LoginStatus1" LoginText="Log in or register" LogoutText="Log out" runat="server" /></div>
    </LayoutTemplate>
</asp:Login>

The only thing different in the version which worked was that insead of the <asp:ImageButton… it had this:

<asp:Button ID="LoginButton" runat="server" CommandName="Login" Text="Log In" ValidationGroup="ctl00$Login1" />
  • 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-16T03:32:14+00:00Added an answer on May 16, 2026 at 3:32 am

    Simply speaking, you need to recompile the DLL.

    The reason being that there is a pagename.designer.cs file which gets updated when you change a control in the markup and that is a code file which would only update upon recompilation.

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

Sidebar

Related Questions

No related questions found

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.