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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. set focus to control after click on button

set focus to control after click on button

Scheduled Pinned Locked Moved ASP.NET
8 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.
  • V Offline
    V Offline
    Vinay Dornala
    wrote on last edited by
    #1

    Hi, How do we set focus to textbox on page after click on button it is end of the page and it is scrollable page. the focus is not set to control, Regards, Vinay Dornala.

    A _ T 3 Replies Last reply
    0
    • V Vinay Dornala

      Hi, How do we set focus to textbox on page after click on button it is end of the page and it is scrollable page. the focus is not set to control, Regards, Vinay Dornala.

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

      textbox1.focus();

      Best Regards ----------------- Abhijit Jana Microsoft Certified Professional "Success is Journey it's not a destination"

      V 1 Reply Last reply
      0
      • A Abhijit Jana

        textbox1.focus();

        Best Regards ----------------- Abhijit Jana Microsoft Certified Professional "Success is Journey it's not a destination"

        V Offline
        V Offline
        Vinay Dornala
        wrote on last edited by
        #3

        Thanks, I need to maintain between postback.

        A 1 Reply Last reply
        0
        • V Vinay Dornala

          Thanks, I need to maintain between postback.

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

          can you confirm it in details ?

          Best Regards ----------------- Abhijit Jana Microsoft Certified Professional "Success is Journey it's not a destination"

          1 Reply Last reply
          0
          • V Vinay Dornala

            Hi, How do we set focus to textbox on page after click on button it is end of the page and it is scrollable page. the focus is not set to control, Regards, Vinay Dornala.

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

            May what you are asking is how to maintain the scroll position of the long page. During the postback goes to the top of the page. If this is the case then you can make smartnavigation to true.

            Apurva Kaushal

            V 1 Reply Last reply
            0
            • _ _AK_

              May what you are asking is how to maintain the scroll position of the long page. During the postback goes to the top of the page. If this is the case then you can make smartnavigation to true.

              Apurva Kaushal

              V Offline
              V Offline
              Vinay Dornala
              wrote on last edited by
              #6

              but it is .ascx file how do i achieve this

              _ 1 Reply Last reply
              0
              • V Vinay Dornala

                but it is .ascx file how do i achieve this

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

                Try to put the same in the container page.

                Apurva Kaushal

                1 Reply Last reply
                0
                • V Vinay Dornala

                  Hi, How do we set focus to textbox on page after click on button it is end of the page and it is scrollable page. the focus is not set to control, Regards, Vinay Dornala.

                  T Offline
                  T Offline
                  trish_
                  wrote on last edited by
                  #8

                  try to use Page.SmartNavigation = true; in page load event. and then use textbox1.setfocus(); in your function.

                  trish http://AllJobSearch.blogspot.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