|
-
Dec 1st, 2003, 03:55 AM
#1
Thread Starter
Junior Member
RequiredValidator ?
<asp:TextBox id="TextBox_search" runat="server"></asp:TextBox>
<asp:TextBox id="TextBox_subscribe" runat="server"></asp:TextBox>
<asp:Button id="Button_search" runat="server" Text="Search"></asp:Button>
<asp:Button id="Button_submit" runat="server" Text="Submit"></asp:Button>
<asp:RequiredFieldValidator id="RequiredFieldValidator1" runat="server" ErrorMessage="Email must not left blank" ControlToValidate="TextBox_subscribe"></asp:RequiredFieldValidator>
========================================
I had 2 buttons with different purpose, but when I pressed the search button for textbox_search(in empty) which I never validate to it, message error on textbox_subscribe came out "email must not left blank".
So how to make RequiredFieldValidator only work with Button_submit not Button_search ?
Thanks in advance.
Last edited by Rio; Dec 4th, 2003 at 11:07 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|