Login control second button issue

J

John

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>
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top