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
  1. Home
  2. Web Development
  3. ASP.NET
  4. TextBox's text's lenght!

TextBox's text's lenght!

Scheduled Pinned Locked Moved ASP.NET
helptutorialquestion
10 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rojan Gh
    wrote on last edited by
    #1

    I don't know how to alert the user that he has reached the limited characters count of the TextBox, using the Validation Controls! I used the RangeValidator and set the Type to string, set the MinimumValue to 1 and the MaximumValue to 255, but it works incorrect, I also used the RegularExpression using the [\ws]{1,255} string, but doesn't work! I'm not good at RegularExpression can anyone help please?

    Sojaner!

    M I D 3 Replies Last reply
    0
    • R Rojan Gh

      I don't know how to alert the user that he has reached the limited characters count of the TextBox, using the Validation Controls! I used the RangeValidator and set the Type to string, set the MinimumValue to 1 and the MaximumValue to 255, but it works incorrect, I also used the RegularExpression using the [\ws]{1,255} string, but doesn't work! I'm not good at RegularExpression can anyone help please?

      Sojaner!

      M Offline
      M Offline
      MoeInsairat
      wrote on last edited by
      #2

      u can use the ValidationSummary i guess it should work

      Estarta

      R 1 Reply Last reply
      0
      • M MoeInsairat

        u can use the ValidationSummary i guess it should work

        Estarta

        R Offline
        R Offline
        Rojan Gh
        wrote on last edited by
        #3

        I can alert the user, but don't know how to validate the length of the text in the TextBox!

        Sojaner!

        M 1 Reply Last reply
        0
        • R Rojan Gh

          I can alert the user, but don't know how to validate the length of the text in the TextBox!

          Sojaner!

          M Offline
          M Offline
          MoeInsairat
          wrote on last edited by
          #4

          Check the MAXLENGTH property for the textbox and thanks for ur answer on my authentication question.. but how can i put the pages in folder ?!

          Estarta

          R 1 Reply Last reply
          0
          • M MoeInsairat

            Check the MAXLENGTH property for the textbox and thanks for ur answer on my authentication question.. but how can i put the pages in folder ?!

            Estarta

            R Offline
            R Offline
            Rojan Gh
            wrote on last edited by
            #5

            I have used the MaxLength but it doesn't have any effect! I still can write more that the MaxLenght!:( In the Solution Explorer right-click the second nude from the top and add a folder, then simply drag and drop your pages to it in the solution explorer and the visual studio will change all the links you have mad to these pages!

            Sojaner!

            M 1 Reply Last reply
            0
            • R Rojan Gh

              I have used the MaxLength but it doesn't have any effect! I still can write more that the MaxLenght!:( In the Solution Explorer right-click the second nude from the top and add a folder, then simply drag and drop your pages to it in the solution explorer and the visual studio will change all the links you have mad to these pages!

              Sojaner!

              M Offline
              M Offline
              MoeInsairat
              wrote on last edited by
              #6

              Thanks alot mano :) about the Maxlengeth i donno exactly wats wrong but it should work man! i will check it now and i will let u know :)

              Estarta

              R 1 Reply Last reply
              0
              • M MoeInsairat

                Thanks alot mano :) about the Maxlengeth i donno exactly wats wrong but it should work man! i will check it now and i will let u know :)

                Estarta

                R Offline
                R Offline
                Rojan Gh
                wrote on last edited by
                #7

                Don't mention it! Thanx!:)

                Sojaner!

                1 Reply Last reply
                0
                • R Rojan Gh

                  I don't know how to alert the user that he has reached the limited characters count of the TextBox, using the Validation Controls! I used the RangeValidator and set the Type to string, set the MinimumValue to 1 and the MaximumValue to 255, but it works incorrect, I also used the RegularExpression using the [\ws]{1,255} string, but doesn't work! I'm not good at RegularExpression can anyone help please?

                  Sojaner!

                  I Offline
                  I Offline
                  indian143
                  wrote on last edited by
                  #8

                  Dear Can you give me code and clear details where you are struck. And whats your problem. I will try to help you? ok.

                  S/W Engineer Akebono Soft Technologies aleem_abdul@akebonosoft.com.

                  1 Reply Last reply
                  0
                  • R Rojan Gh

                    I don't know how to alert the user that he has reached the limited characters count of the TextBox, using the Validation Controls! I used the RangeValidator and set the Type to string, set the MinimumValue to 1 and the MaximumValue to 255, but it works incorrect, I also used the RegularExpression using the [\ws]{1,255} string, but doesn't work! I'm not good at RegularExpression can anyone help please?

                    Sojaner!

                    D Offline
                    D Offline
                    divakarjmc10
                    wrote on last edited by
                    #9

                    u can set maxlength proerty as u want or for alert message u can use javascript function like TextBox1.Attributes.Add("onkeypress", "Function();");(write this line in page load and the function in designerhtml view) in that function u write the code to count characters... (this fn. can be called for each and every key entry from keyboard ) nZoy..!:):rose:

                    I 1 Reply Last reply
                    0
                    • D divakarjmc10

                      u can set maxlength proerty as u want or for alert message u can use javascript function like TextBox1.Attributes.Add("onkeypress", "Function();");(write this line in page load and the function in designerhtml view) in that function u write the code to count characters... (this fn. can be called for each and every key entry from keyboard ) nZoy..!:):rose:

                      I Offline
                      I Offline
                      indian143
                      wrote on last edited by
                      #10

                      And count the characters length as document.getElementById(S/W Engineer Akebono Soft Technologies aleem_abdul@akebonosoft.com.

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

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