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. Text box

Text box

Scheduled Pinned Locked Moved ASP.NET
question
13 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.
  • I Imthu

    hai all, In a textbox if i type first letter(for ex:say 'a').. it should display all the letters starting with that alphabet.. how can i do that?? thanks in advance

    with Regards, Imthiyas Ahamed.A

    C Offline
    C Offline
    Christian Graus
    wrote on last edited by
    #2

    'that' alphabet ? How many are there ? To do this in ASP.NET, you need to handle the key pressed event of the text box input control, and then write javascript to insert the text you want. Or, you'd have to do a postback, which would be nasty

    Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

    1 Reply Last reply
    0
    • I Imthu

      hai all, In a textbox if i type first letter(for ex:say 'a').. it should display all the letters starting with that alphabet.. how can i do that?? thanks in advance

      with Regards, Imthiyas Ahamed.A

      A Offline
      A Offline
      Arindam Tewary
      wrote on last edited by
      #3

      Hi 1. Capture the key press event in javascript. 2. Using AJAX( go for XMLHTTP object of browser) sent the character you have pressed to the AJAX file(AJAX engine) 3. Get the result as string with some delimeter in it. 4. Separate the result 5. Show results in a DIV with proper style. example: Suppose you have typed 'a' using AJAX you may send a HTTP get request like this http://loclhost/AJAXFile.aspx?char=a to get a result string this way ... 'aasha|abbas|arindam|asif' Now manipulate this string using Javascript and build a DIV to display this resultset. Hope this helps ...

      Thanks, Arindam D Tewary

      T 1 Reply Last reply
      0
      • A Arindam Tewary

        Hi 1. Capture the key press event in javascript. 2. Using AJAX( go for XMLHTTP object of browser) sent the character you have pressed to the AJAX file(AJAX engine) 3. Get the result as string with some delimeter in it. 4. Separate the result 5. Show results in a DIV with proper style. example: Suppose you have typed 'a' using AJAX you may send a HTTP get request like this http://loclhost/AJAXFile.aspx?char=a to get a result string this way ... 'aasha|abbas|arindam|asif' Now manipulate this string using Javascript and build a DIV to display this resultset. Hope this helps ...

        Thanks, Arindam D Tewary

        T Offline
        T Offline
        tisaracorner
        wrote on last edited by
        #4

        Wow!!! Are you using aircraft to reach your office?

        C A 2 Replies Last reply
        0
        • T tisaracorner

          Wow!!! Are you using aircraft to reach your office?

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #5

          ROTFL - well said.

          Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

          A 1 Reply Last reply
          0
          • C Christian Graus

            ROTFL - well said.

            Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

            A Offline
            A Offline
            Arindam Tewary
            wrote on last edited by
            #6

            sorry guys if it was not helpful .. but what I have suggested is a good option if the values to be populated dynamically from the server. Anyone can point out for a better way !!!! Indeed a bit javascript is enough if the set of values to be populated(on key press event) is static and if can be stored in client side( preferebly in an array). Any feedback would be appreciated !!!! :laugh:

            Thanks, Arindam D Tewary

            C 1 Reply Last reply
            0
            • A Arindam Tewary

              sorry guys if it was not helpful .. but what I have suggested is a good option if the values to be populated dynamically from the server. Anyone can point out for a better way !!!! Indeed a bit javascript is enough if the set of values to be populated(on key press event) is static and if can be stored in client side( preferebly in an array). Any feedback would be appreciated !!!! :laugh:

              Thanks, Arindam D Tewary

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #7

              Yeah, the AJAX thing will work, but it does smell like potential overkill, especially if the values are known when the app starts, and if he just wants to get the alphabet back.

              Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

              A 1 Reply Last reply
              0
              • T tisaracorner

                Wow!!! Are you using aircraft to reach your office?

                A Offline
                A Offline
                Arindam Tewary
                wrote on last edited by
                #8

                I dont share my things to others !!!! my aircraft is my personal :laugh: No space for others !!!!! :-O

                Thanks, Arindam D Tewary

                T 1 Reply Last reply
                0
                • C Christian Graus

                  Yeah, the AJAX thing will work, but it does smell like potential overkill, especially if the values are known when the app starts, and if he just wants to get the alphabet back.

                  Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

                  A Offline
                  A Offline
                  Arindam Tewary
                  wrote on last edited by
                  #9

                  Thanks Graus !!! :)

                  Thanks, Arindam D Tewary

                  1 Reply Last reply
                  0
                  • A Arindam Tewary

                    I dont share my things to others !!!! my aircraft is my personal :laugh: No space for others !!!!! :-O

                    Thanks, Arindam D Tewary

                    T Offline
                    T Offline
                    tisaracorner
                    wrote on last edited by
                    #10

                    It was a kidding. :-> JavaScript will serve that purpose. It is simple and it is the right way

                    A 1 Reply Last reply
                    0
                    • T tisaracorner

                      It was a kidding. :-> JavaScript will serve that purpose. It is simple and it is the right way

                      A Offline
                      A Offline
                      Arindam Tewary
                      wrote on last edited by
                      #11

                      The best thing is to write "the solution" here in the forum !!! Only a single line (what you have adviced me now) could have been enough ... lets put the possible solution together here .... and lets allow the person to choose the best one ... What do you feel ?;P

                      Thanks, Arindam D Tewary

                      T 1 Reply Last reply
                      0
                      • A Arindam Tewary

                        The best thing is to write "the solution" here in the forum !!! Only a single line (what you have adviced me now) could have been enough ... lets put the possible solution together here .... and lets allow the person to choose the best one ... What do you feel ?;P

                        Thanks, Arindam D Tewary

                        T Offline
                        T Offline
                        tisaracorner
                        wrote on last edited by
                        #12

                        My apologies. But the answer was there. What Christian Graus said is enough Now about my feelings I feel cool, pleasure and thirsty for a cup coffee. :-D

                        A 1 Reply Last reply
                        0
                        • T tisaracorner

                          My apologies. But the answer was there. What Christian Graus said is enough Now about my feelings I feel cool, pleasure and thirsty for a cup coffee. :-D

                          A Offline
                          A Offline
                          Arindam Tewary
                          wrote on last edited by
                          #13

                          Hi tisaracorner, Have a nice time with your coffee !!!

                          Thanks, Arindam D Tewary

                          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