Login control second button issue

Discussion in 'ASP .Net Web Controls' started by John, Dec 11, 2005.

  1. John

    John Guest

    Hi

    I am using a login in template mode as I have customised it. I have added an
    image as a 'New User' button using the following code;

    <a class="button" href="Default2.aspx">
    <asp:Image ID="Image1" runat="server" AlternateText="create a new
    account" ImageUrl="~/images/box/bu_newuser.gif" SkinID="create"
    ImageAlign="Middle" />
    </a>

    The problem is that when I click on this image button, the webform
    Default2.aspx and only the current page (login.aspx) is refreshed. What is
    the problem and how can I fix it?

    The full customised login control code is below .

    Thanks

    Regards


    <asp:Login ID="Login" runat="server"
    Width="304px" Height="154px">
    <LayoutTemplate>
    <table>
    <tr>
    <td>
    <asp:Label
    ID="UserNameLabel" runat="server" AssociatedControlID="UserName"
    CssClass="label">User Name</asp:Label>
    <br />
    <asp:TextBox
    ID="UserName" runat="server" AccessKey="u" CssClass="textbox"
    Height="16px"></asp:TextBox>
    <asp:RequiredFieldValidator
    ID="UserNameRequired" runat="server" ControlToValidate="UserName"
    ErrorMessage="User
    Name is required." ToolTip="User Name is
    required.">*</asp:RequiredFieldValidator>
    <br />
    <br />
    <asp:Label
    ID="PasswordLabel" runat="server" AssociatedControlID="Password"
    CssClass="label"
    Height="16px">Password</asp:Label>
    <br />
    <asp:TextBox
    ID="Password" runat="server" AccessKey="p" CssClass="textbox"
    TextMode="Password"
    Height="16px"></asp:TextBox>
    <asp:RequiredFieldValidator
    ID="PasswordRequired" runat="server" ControlToValidate="Password"
    ToolTip="Password
    is required.">*</asp:RequiredFieldValidator>
    <br />
    <br />
    <div>
    <asp:CheckBox
    ID="RememberMe" runat="server" Height="7px" Text=" Remember me next time"
    Width="227px"
    Checked="True" />
    </div>
    <br />
    </td>
    </tr>
    <tr>
    <td align="left"
    valign="middle">
    <asp:ImageButton
    ID="LoginButton" runat="server" AlternateText="login" CommandName="Login"
    CssClass="noborder"
    Height="31px" ImageUrl="~/images/box/bu_login_sm.gif" SkinID="login"
    Width="110px"
    ImageAlign="Middle" />
    <a
    class="button" href="Default2.aspx">
    <asp:Image
    ID="Image1" runat="server" AlternateText="create a new account"
    ImageUrl="~/images/box/bu_newuser.gif"
    SkinID="create"
    ImageAlign="Middle" />
    </a>
    </td>
    </tr>
    <tr>
    <td align="center"
    style="color: red; width: 299px;">
    <asp:Literal
    ID="FailureText" runat="server" EnableViewState="False"></asp:Literal>
    </td>
    </tr>
    </table>
    </LayoutTemplate>
    </asp:Login>
    John, Dec 11, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. panik
    Replies:
    0
    Views:
    438
    panik
    Dec 4, 2003
  2. ike2010
    Replies:
    0
    Views:
    659
    ike2010
    Nov 15, 2005
  3. John
    Replies:
    0
    Views:
    684
  4. Dave Prout

    Adding a second button if the first button is clicked

    Dave Prout, Jun 8, 2004, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    200
    John Saunders
    Jun 8, 2004
  5. yelipolok
    Replies:
    4
    Views:
    238
    John W. Krahn
    Jan 27, 2010
Loading...

Share This Page