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. Handling textbox's lostfocus event

Handling textbox's lostfocus event

Scheduled Pinned Locked Moved ASP.NET
questioncsharpasp-netsysadminhelp
7 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.
  • P Offline
    P Offline
    pavya_Cool
    wrote on last edited by
    #1

    Hi to all, I am new to ASP.net and i want to execute some code after textbox's lostfocus event in ASP.Net. I tried by using its TextChanged event but it takes more time to execute it because it executes on server, i want to execute this code on client machine only. how can i do this? Help me. Thanks.

    Pravin

    P A 2 Replies Last reply
    0
    • P pavya_Cool

      Hi to all, I am new to ASP.net and i want to execute some code after textbox's lostfocus event in ASP.Net. I tried by using its TextChanged event but it takes more time to execute it because it executes on server, i want to execute this code on client machine only. how can i do this? Help me. Thanks.

      Pravin

      P Offline
      P Offline
      Perspx
      wrote on last edited by
      #2

      pavya_Cool wrote:

      i want to execute this code on client machine only. how can i do this?

      You could use a client side script such as Javascript with the onChange() event handler - it depends what code you want to run though. Regards, --Perspx

      "The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia Introduction to Object-Oriented JavaScript

      P 1 Reply Last reply
      0
      • P pavya_Cool

        Hi to all, I am new to ASP.net and i want to execute some code after textbox's lostfocus event in ASP.Net. I tried by using its TextChanged event but it takes more time to execute it because it executes on server, i want to execute this code on client machine only. how can i do this? Help me. Thanks.

        Pravin

        A Offline
        A Offline
        Abhijit Jana
        wrote on last edited by
        #3

        use onblur Property for Lostfoucs on Client Side

        cheers, Abhijit Check My Latest Article

        P 1 Reply Last reply
        0
        • P Perspx

          pavya_Cool wrote:

          i want to execute this code on client machine only. how can i do this?

          You could use a client side script such as Javascript with the onChange() event handler - it depends what code you want to run though. Regards, --Perspx

          "The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia Introduction to Object-Oriented JavaScript

          P Offline
          P Offline
          pavya_Cool
          wrote on last edited by
          #4

          Hi, Thanks for reply. I tried this by using the following function. txtusername.Attributes.Add("onchange", "txtusername_TextChanged()") but i am not getting success. Also i am not able to trace it.

          Pravin

          A 1 Reply Last reply
          0
          • P pavya_Cool

            Hi, Thanks for reply. I tried this by using the following function. txtusername.Attributes.Add("onchange", "txtusername_TextChanged()") but i am not getting success. Also i am not able to trace it.

            Pravin

            A Offline
            A Offline
            Abhijit Jana
            wrote on last edited by
            #5

            pavya_Cool wrote:

            txtusername.Attributes.Add("onchange", "txtusername_TextChanged()")

            your trying to run a Server side function, you cant do it using this way. just use ther javascript function txtusername.Attributes.Add("onchange", "javaScriptFunction()")

            cheers, Abhijit Check My Latest Article

            1 Reply Last reply
            0
            • A Abhijit Jana

              use onblur Property for Lostfoucs on Client Side

              cheers, Abhijit Check My Latest Article

              P Offline
              P Offline
              pavya_Cool
              wrote on last edited by
              #6

              thanks, actually iam new to javascript... i have to check this first...

              Pravin

              A 1 Reply Last reply
              0
              • P pavya_Cool

                thanks, actually iam new to javascript... i have to check this first...

                Pravin

                A Offline
                A Offline
                Abhijit Jana
                wrote on last edited by
                #7

                sure , just check it and let me know .

                cheers, Abhijit Check My Latest Article

                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