hey

asp.net 3.5

I have this asp.net 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">
<UserNameTemplate>
<asp:Table ID="Table1" runat="server">
<asp:TableRow>
<asp:TableCell Width="120">Brukernavn:</asp:TableCell>
<asp:TableCell Width="200">
<asp:TextBox ID="UserName" runat="server"
Width="90%"></asp:TextBox>
</asp:TableCell>
</asp:TableRow>

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

<QuestionTemplate>

Re: Passwordrecovery control && requiredFieldValidator by Jeff

Jeff
Fri Mar 14 02:03:06 CDT 2008

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


"Jeff" <no_email_address> wrote in message
news:OMlI6FRhIHA.1168@TK2MSFTNGP02.phx.gbl...
> hey
>
> asp.net 3.5
>
> I have this asp.net 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">
> <UserNameTemplate>
> <asp:Table ID="Table1" runat="server">
> <asp:TableRow>
> <asp:TableCell Width="120">Brukernavn:</asp:TableCell>
> <asp:TableCell Width="200">
> <asp:TextBox ID="UserName" runat="server"
> Width="90%"></asp:TextBox>
> </asp:TableCell>
> </asp:TableRow>
>
> <asp:TableRow>
> <asp:TableCell ColumnSpan="2" HorizontalAlign="Right">
> <asp:RequiredFieldValidator ID="rfvUserName"
> ErrorMessage="Usernameis required" ControlToValidate="UserName"
> Display="Dynamic" ValidationGroup="PasswordRecovery1" runat="server"
> >*</asp:RequiredFieldValidator>
> <asp:Button ID="SubmitButton" CommandName="Submit"
> runat="server" Text="Submit" />
> </asp:TableCell>
> </asp:TableRow>
> </asp:Table>
> </UserNameTemplate>
>
> <QuestionTemplate>
>