Results 1 to 3 of 3

Thread: Required validator control code ??

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2003
    Location
    Earth
    Posts
    23

    Question Required validator control code ??

    Where is the javascript code ?? I cannot see it in HTML desgin. Where is visual studio hidden it ??
    Because I want to modify it manually.. for some purpose, Is it can ??

    Thanks in advance..

  2. #2
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    It gets rendered to the browser dynamically based on the browser that calls the page. This allows the validator to customize the javascript for the calling browser. You can't edit it.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Oct 2003
    Location
    Earth
    Posts
    23
    How about this..
    I want each textbox have their own validator and must independent, so if we press search button(in empty field) only 'Search Query Required' message appear.
    Can you help me ?

    Code:
    <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" ControlToValidate="TextBox_subscribe" ErrorMessage="Email Required" Display="Dynamic"></asp:RequiredFieldValidator>
    
    <asp:RequiredFieldValidator id="RequiredFieldValidator2" runat="server" Display="Dynamic" ErrorMessage="Search Query Required" ControlToValidate="TextBox_search"></asp:RequiredFieldValidator>
    Thanks in advance..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width