Clientside validation in login control

J

Jon Paal

using VWD and asp.net 2.0

how do I enable clientside validation in ligin control ?

Following code does not produce popup alerts or red asterisks .


====================
<div id="content">
<asp:loginview id="LoginArea" runat="server">
<AnonymousTemplate>
<asp:login id="Login1" runat="server" UserNameRequiredErrorMessage="Username is required" PasswordRequiredErrorMessage="Password is
required">
<layouttemplate>
<div class="login">
<asp:label runat="server" id="UserNameLabel" CssClass="label" associatedcontrolid="UserName">User Name</asp:label>
<asp:textbox runat="server" id="UserName" cssclass="textbox" accesskey="u" />
<asp:requiredfieldvalidator ControlToValidate="UserName" runat="server" id="UserNameRequired" validationgroup="Login1"
errormessage="User Name is required." tooltip="User Name is required." >*</asp:requiredfieldvalidator>
<asp:label runat="server" id="PasswordLabel" CssClass="label" associatedcontrolid="Password">Password</asp:label>
<asp:textbox runat="server" id="Password" textmode="Password" cssclass="textbox" accesskey="p" />
<asp:requiredfieldvalidator ControlToValidate="Password" runat="server" id="PasswordRequired" validationgroup="Login1"
errormessage="Password is required." tooltip="Password is required." >*</asp:requiredfieldvalidator>
<div>
<asp:checkbox runat="server" id="RememberMe" text="Remember me."/>
</div>
<asp:imagebutton runat="server" id="LoginButton" CommandName="Login" AlternateText="login" skinid="login" CssClass="button"/>
<p class="warning">
<asp:Literal runat="server" ID="FailureText" EnableViewState="False"></asp:Literal></p>
<asp:ValidationSummary ShowMessageBox="True" ShowSummary="False" ValidationGroup="Login1" ID="ValidationSummary1" runat="server" />
</div>
</layouttemplate>
</asp:login>
</anonymoustemplate>
<LoggedInTemplate>
<h4><asp:loginname id="LoginName1" runat="server" formatstring="Welcome {0}!" /></h4>
</LoggedInTemplate>
</asp:loginview>
</div>

=====================
 
P

Paul Clement

¤ using VWD and asp.net 2.0
¤
¤ how do I enable clientside validation in ligin control ?
¤
¤ Following code does not produce popup alerts or red asterisks .
¤

The Membership API operates on the server side. What would you validate against on the client side
anyway?


Paul
~~~~
Microsoft MVP (Visual Basic)
 
J

Jon Paal

I was initially just trying to verify the fields were completed, but thought I would also verify if the password was formatted
correctly.

Apparently this is not an option ...?
 
P

Paul Clement

¤ I was initially just trying to verify the fields were completed, but thought I would also verify if the password was formatted
¤ correctly.
¤
¤ Apparently this is not an option ...?
¤

Not that I am aware of.


Paul
~~~~
Microsoft MVP (Visual Basic)
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top