On Jul 30, 5:29 am, "Gary W. Smith" <gary.sm...@primeexalia.com>
wrote:
> Hello,
>
[quoted text clipped - 16 lines]
>
> Any help or real samples would be greatly appreciated.
Hi...
here it goes...
in html....
<strong><span style="font-size: 24pt">Just For Test Things<br />
<br />
</span></strong>
<asp:RadioButtonList ID="RadioButtonList1" runat="server"
AutoPostBack="True"
OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged"
RepeatDirection="Horizontal">
<asp:ListItem>Email</asp:ListItem>
<asp:ListItem>Phone</asp:ListItem>
</asp:RadioButtonList><br />
Email:<asp:TextBox ID="txtEmail" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="ERFV" runat="server"
ControlToValidate="txtEmail"
ErrorMessage="RequiredFieldValidator"></
asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="EREV" runat="server"
ControlToValidate="txtEmail"
ErrorMessage="RegularExpressionValidator"
ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></
asp:RegularExpressionValidator><br />
<br />
Phone:<asp:TextBox ID="txtPhone" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="PRFV" runat="server"
ControlToValidate="txtPhone"
ErrorMessage="RequiredFieldValidator"></
asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="PREV" runat="server"
ControlToValidate="txtPhone"
ErrorMessage="RegularExpressionValidator"
ValidationExpression="((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4}"></
asp:RegularExpressionValidator>
<br />
<br />
<asp:Button ID="Button1" runat="server" Text="Button" />
and in code behind...
protected void RadioButtonList1_SelectedIndexChanged(object sender,
EventArgs e)
{
if (RadioButtonList1.SelectedIndex == 0)
{
PREV.Enabled = false;
PRFV.Enabled = false;
EREV.Enabled = true;
ERFV.Enabled = true;
}
else
{
EREV.Enabled = false;
ERFV.Enabled = false;
PREV.Enabled = true;
PRFV.Enabled = true;
}
}
Thanks
Md. Masudur Rahman (Munna)
Kaz Software Ltd.
www.kaz.com.bd
http://munnacs.110mb.com
Gary W. Smith - 03 Aug 2007 22:15 GMT
> Hi...
>
[quoted text clipped - 65 lines]
>
> - Show quoted text -
Munna,
We are currently doing something similar. I was hoping to prevent the
user from having to do a full post back to validate BUT that works, so
we'll stick with it.
Thanks,
Gary Wayne Smith