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. retaining tab index

retaining tab index

Scheduled Pinned Locked Moved ASP.NET
databasehelp
7 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.
  • H Offline
    H Offline
    hepsy i
    wrote on last edited by
    #1

    Hi, I have a few controls in my page. I have two drop downlist controls in which the second one is populated when a value is selcted in the first dropdownlist . During this post back the tab index is lost .The tab is going to the first control. Can some one help me with this so that i can get the tab index to the next one, Thank you, hepsi

    C 1 Reply Last reply
    0
    • H hepsy i

      Hi, I have a few controls in my page. I have two drop downlist controls in which the second one is populated when a value is selcted in the first dropdownlist . During this post back the tab index is lost .The tab is going to the first control. Can some one help me with this so that i can get the tab index to the next one, Thank you, hepsi

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

      You could use AJAX to get the values, and set the selected box using javascript. Or, you could set the selected item in the selected index changed event handler.

      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 )

      H 1 Reply Last reply
      0
      • C Christian Graus

        You could use AJAX to get the values, and set the selected box using javascript. Or, you could set the selected item in the selected index changed event handler.

        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 )

        H Offline
        H Offline
        hepsy i
        wrote on last edited by
        #3

        I want to retain the tab index ov post back . I'm not using ajax... Hepsi

        N 1 Reply Last reply
        0
        • H hepsy i

          I want to retain the tab index ov post back . I'm not using ajax... Hepsi

          N Offline
          N Offline
          N a v a n e e t h
          wrote on last edited by
          #4

          hepsy.i wrote:

          I want to retain the tab index ov post back . I'm not using ajax...

          Set MaintainScrollPositionOnPostback="true" if you are using ASP.NET 2.0.


          My Website | Ask smart questions

          H 1 Reply Last reply
          0
          • N N a v a n e e t h

            hepsy.i wrote:

            I want to retain the tab index ov post back . I'm not using ajax...

            Set MaintainScrollPositionOnPostback="true" if you are using ASP.NET 2.0.


            My Website | Ask smart questions

            H Offline
            H Offline
            hepsy i
            wrote on last edited by
            #5

            Thank you, i'm not using 2.0, i'm using 1.0. i dont want the scroll bar postion... i need the tab index to go to the next dropdownlist but its going to the first control. Thank you hepsi

            C C 2 Replies Last reply
            0
            • H hepsy i

              Thank you, i'm not using 2.0, i'm using 1.0. i dont want the scroll bar postion... i need the tab index to go to the next dropdownlist but its going to the first control. Thank you hepsi

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

              To reiterate my answer - if you don't want to use AJAX ( and it would be nice if you did ), then you should set the selected item in your code behind, in the event handler for the first drop down list changing, the one that fills the second drop down list. If there's no property on the server side, you could certainly inject client side code that runs when the page has loaded.

              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
              • H hepsy i

                Thank you, i'm not using 2.0, i'm using 1.0. i dont want the scroll bar postion... i need the tab index to go to the next dropdownlist but its going to the first control. Thank you hepsi

                C Offline
                C Offline
                Cfer83
                wrote on last edited by
                #7

                Why don't you just use a variable to store the information pointing to the control which has focus? When page reloads just fetch the data from the viewstate.

                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