Passwordrecovery control && requiredFieldValidator

Discussion in 'ASP .Net' started by Jeff, Mar 13, 2008.

  1. Jeff

    Jeff Guest

    hey 3.5

    I have this markup. it displays a PasswordRecovery control on a
    webpage. In the markup I've set UserName as a reguired field. The problem
    is that when I don't enter something in the UserName field and click Submit,
    nothing happens.. it doesn't even display an error message... I thought that
    when clicking the submit button the requiredFieldValidator would display an
    error message... any suggestions?

    Here is my markup:
    <asp:passwordRecovery ID="PasswordRecovery1" runat="server">
    <asp:Table ID="Table1" runat="server">
    <asp:TableCell Width="120">Brukernavn:</asp:TableCell>
    <asp:TableCell Width="200">
    <asp:TextBox ID="UserName" runat="server"

    <asp:TableCell ColumnSpan="2" HorizontalAlign="Right">
    <asp:RequiredFieldValidator ID="rfvUserName"
    ErrorMessage="Usernameis required" ControlToValidate="UserName"
    Display="Dynamic" ValidationGroup="PasswordRecovery1" runat="server"
    <asp:Button ID="SubmitButton" CommandName="Submit"
    runat="server" Text="Submit" />

    Jeff, Mar 13, 2008
    1. Advertisements

  2. Jeff

    Jeff Guest

    I've somewhat solved this case.....

    Jeff, Mar 14, 2008
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.