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 Onblur

TextBox Onblur

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nethelptutorial
9 Posts 3 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.
  • A Offline
    A Offline
    aaraaayen 0
    wrote on last edited by
    #1

    Friends, In my asp.net application i have to write function on textbox's onblur event. Can anyone please help me how to do this. Eg: I am having a textbox for email id. when user leave the textbox i have to get the part before @symbol in that. For that i have write event in textbox's onblur. Thanks and Regards,

    Prya

    _ 1 Reply Last reply
    0
    • A aaraaayen 0

      Friends, In my asp.net application i have to write function on textbox's onblur event. Can anyone please help me how to do this. Eg: I am having a textbox for email id. when user leave the textbox i have to get the part before @symbol in that. For that i have write event in textbox's onblur. Thanks and Regards,

      Prya

      _ Offline
      _ Offline
      _AK_
      wrote on last edited by
      #2

      You can write a javascript function to do the task and call this function on onblur event of the textbox.

      Best Regards, Apurva Kaushal

      A P 2 Replies Last reply
      0
      • _ _AK_

        You can write a javascript function to do the task and call this function on onblur event of the textbox.

        Best Regards, Apurva Kaushal

        A Offline
        A Offline
        aaraaayen 0
        wrote on last edited by
        #3

        Can u pl. tellme how to give onblur event of textbox in .cs page

        Prya

        _ 1 Reply Last reply
        0
        • A aaraaayen 0

          Can u pl. tellme how to give onblur event of textbox in .cs page

          Prya

          _ Offline
          _ Offline
          _AK_
          wrote on last edited by
          #4

          you can do it like this: Textbox1.attributes.add(OnBlur,"Javascript:yourfunc();")

          Best Regards, Apurva Kaushal

          A 1 Reply Last reply
          0
          • _ _AK_

            you can do it like this: Textbox1.attributes.add(OnBlur,"Javascript:yourfunc();")

            Best Regards, Apurva Kaushal

            A Offline
            A Offline
            aaraaayen 0
            wrote on last edited by
            #5

            i have included master page in that aspx page. so there is a tag . So shall i place the and tags above this and write the function there. But when I tried in some where its giving problem while adding head tags before content tag. <div class="ForumSig">Prya</div></x-turndown>

            _ 1 Reply Last reply
            0
            • A aaraaayen 0

              i have included master page in that aspx page. so there is a tag . So shall i place the and tags above this and write the function there. But when I tried in some where its giving problem while adding head tags before content tag. <div class="ForumSig">Prya</div></x-turndown>

              _ Offline
              _ Offline
              _AK_
              wrote on last edited by
              #6

              I think you can put the function there in the head tag itself. What is the problem you are getting on doing the same.

              Best Regards, Apurva Kaushal

              A 1 Reply Last reply
              0
              • _ _AK_

                I think you can put the function there in the head tag itself. What is the problem you are getting on doing the same.

                Best Regards, Apurva Kaushal

                A Offline
                A Offline
                aaraaayen 0
                wrote on last edited by
                #7

                The Error I am getting is: Content is not supported outside 'script' or 'asp:content' regions.

                Prya

                _ 1 Reply Last reply
                0
                • A aaraaayen 0

                  The Error I am getting is: Content is not supported outside 'script' or 'asp:content' regions.

                  Prya

                  _ Offline
                  _ Offline
                  _AK_
                  wrote on last edited by
                  #8

                  Try it by putting it inside the tag.

                  Best Regards, Apurva Kaushal

                  1 Reply Last reply
                  0
                  • _ _AK_

                    You can write a javascript function to do the task and call this function on onblur event of the textbox.

                    Best Regards, Apurva Kaushal

                    P Offline
                    P Offline
                    P A N K A J
                    wrote on last edited by
                    #9

                    you can add the javsscript function inside the tag. call that javascript function with the help of .cs file.

                    Pankaj Gupta (Take it easy)

                    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