Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
C

colliek

@colliek
About
Posts
2
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Loop through textboxes in table and perform validation clientside
    C colliek

    Thanks. I know and this is what I am trying to do now. But I am unable to. How can I do this with customvalidation client side? Thanks

    JavaScript question sysadmin help tutorial

  • Loop through textboxes in table and perform validation clientside
    C colliek

    Hi, I have about

    12 rows and each row contains 2 textboxes eg txtRateFrom txtRateTo.

    Obviously, each textbox has a different name but it will always contain txtXXXFrom and txtXXXTo.

    <table class="style1">
    <tr>

            <td>
                <asp:TextBox ID="txtRateFrom" runat="server"    </asp:TextBox>
    
            </td>
            <td>
               <asp:TextBox ID="txtRateTo" runat="server"></asp:TextBox></td>
        </tr>
        <tr>
            <td>
                <asp:TextBox ID="txtYieldFrom" runat="server"></asp:TextBox>
    
            </td>
            <td>
               <asp:TextBox ID="txtYieldTo" runat="server"></asp:TextBox></td>
        </tr>
        <tr>
            <td>
                 <asp:TextBox ID="txtCalFrom" runat="server"></asp:TextBox></td>
            <td>
                  <asp:TextBox ID="txtCalTo" runat="server"></asp:TextBox></td>
        </tr>
    

    The fields aren't required and user doesn't have to fill in any textbox or he can fill in just one textbox. If he fills in To he doesn't have to fill in From.

    The range he can enter in the textboxes are from 0-100. So I assume that if he only enters a To number the From value is 0.

    If he enters From number only I assume the to is 100.

    I need to do a few validations.

    Make sure only integers are entered as soon as user types text in the textboxes.
    Check that it's in the correct range. User can't enter for example 101.
    And make sure that the To field is bigger than the From field.
    

    I need to show the user messages regarding the relevant error inside a validationsummary and also show * next to the td where the error occurs. If the error occurs for example in the txtratefrom textbox then next to Rate td i need to show Rate *.

    What is the most efficient way of doing this?

    Thanks

    JavaScript question sysadmin help tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups