Clientside validation in login control

Discussion in 'ASP .Net' started by Jon Paal, Dec 1, 2005.

  1. Jon Paal

    Jon Paal Guest

    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>

    =====================
     
    Jon Paal, Dec 1, 2005
    #1
    1. Advertising

  2. Jon Paal

    Paul Clement Guest

    On Wed, 30 Nov 2005 17:14:24 -0800, "Jon Paal" <Jon nospam Paal @ everywhere dot com> wrote:

    ¤ 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)
     
    Paul Clement, Dec 1, 2005
    #2
    1. Advertising

  3. Jon Paal

    Jon Paal Guest

    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 ...?
     
    Jon Paal, Dec 1, 2005
    #3
  4. Jon Paal

    Paul Clement Guest

    On Thu, 1 Dec 2005 13:30:02 -0800, "Jon Paal" <Jon nospam Paal @ everywhere dot com> wrote:

    ¤ 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)
     
    Paul Clement, Dec 6, 2005
    #4
    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. Eddie Dodd

    Clientside validation not working

    Eddie Dodd, May 26, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    480
    Eddie Dodd
    May 27, 2004
  2. Dennis Calla

    Clientside validation not working.

    Dennis Calla, Jan 13, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    441
    Peter Blum
    Jan 13, 2005
  3. Paul
    Replies:
    1
    Views:
    2,143
    Scott Allen
    May 25, 2005
  4. Kris
    Replies:
    1
    Views:
    621
    Peter Blum
    Jun 30, 2005
  5. MattC
    Replies:
    1
    Views:
    436
    Peter Blum
    Jul 22, 2005
Loading...

Share This Page