Image button and tabstop=false

Discussion in 'ASP .Net Web Controls' started by Jerry C, Feb 26, 2007.

  1. Jerry C

    Jerry C Guest

    I have imagebuttion on a page and I don't want them to be tabstops. I connot
    find a tabstop=fales. how do I stop the buttion from receiving focus with
    the user is using the tab key.

    Thank you
    --
    Jerry
     
    Jerry C, Feb 26, 2007
    #1
    1. Advertising

  2. Hello Jerry,

    As for preventing imagebutton(or other page element) from accepting tab
    focus, a simply way is to set Control's TabIndex as "-1", e.g.

    <asp:ImageButton ID="ImageButton2" runat="server" TabIndex="-1"
    ImageUrl="...." />

    the above control will be rendered as the following html source:

    <input type="image" name="ImageButton2" id="ImageButton2" tabindex="-1"
    src="...." />

    I've tested it on my side and it works in both IE7 and FF2.

    Hope this helps.

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead



    ==================================================

    Get notification to my posts through email? Please refer to
    http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
    ications.



    Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
    where an initial response from the community or a Microsoft Support
    Engineer within 1 business day is acceptable. Please note that each follow
    up response may take approximately 2 business days as the support
    professional working with you may need further investigation to reach the
    most efficient resolution. The offering is not appropriate for situations
    that require urgent, real-time or phone-based interactions or complex
    project analysis and dump analysis issues. Issues of this nature are best
    handled working with a dedicated Microsoft Support Engineer by contacting
    Microsoft Customer Support Services (CSS) at
    http://msdn.microsoft.com/subscriptions/support/default.aspx.

    ==================================================



    This posting is provided "AS IS" with no warranties, and confers no rights.
     
    Steven Cheng[MSFT], Feb 27, 2007
    #2
    1. Advertising

  3. Jerry C

    Jerry C Guest

    Steven,

    Thank you it works great.


    --
    Jerry


    "Steven Cheng[MSFT]" wrote:

    > Hello Jerry,
    >
    > As for preventing imagebutton(or other page element) from accepting tab
    > focus, a simply way is to set Control's TabIndex as "-1", e.g.
    >
    > <asp:ImageButton ID="ImageButton2" runat="server" TabIndex="-1"
    > ImageUrl="...." />
    >
    > the above control will be rendered as the following html source:
    >
    > <input type="image" name="ImageButton2" id="ImageButton2" tabindex="-1"
    > src="...." />
    >
    > I've tested it on my side and it works in both IE7 and FF2.
    >
    > Hope this helps.
    >
    > Sincerely,
    >
    > Steven Cheng
    >
    > Microsoft MSDN Online Support Lead
    >
    >
    >
    > ==================================================
    >
    > Get notification to my posts through email? Please refer to
    > http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
    > ications.
    >
    >
    >
    > Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
    > where an initial response from the community or a Microsoft Support
    > Engineer within 1 business day is acceptable. Please note that each follow
    > up response may take approximately 2 business days as the support
    > professional working with you may need further investigation to reach the
    > most efficient resolution. The offering is not appropriate for situations
    > that require urgent, real-time or phone-based interactions or complex
    > project analysis and dump analysis issues. Issues of this nature are best
    > handled working with a dedicated Microsoft Support Engineer by contacting
    > Microsoft Customer Support Services (CSS) at
    > http://msdn.microsoft.com/subscriptions/support/default.aspx.
    >
    > ==================================================
    >
    >
    >
    > This posting is provided "AS IS" with no warranties, and confers no rights.
    >
    >
    >
    >
     
    Jerry C, Feb 27, 2007
    #3
  4. You're welcome :)

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead
     
    Steven Cheng[MSFT], Feb 28, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nikhil Patel

    tabstop of a textbox

    Nikhil Patel, Aug 24, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    5,783
    tukel
    Nov 13, 2008
  2. Stefan

    Tabstop at decimal point

    Stefan, Nov 18, 2005, in forum: HTML
    Replies:
    3
    Views:
    1,727
    Jukka K. Korpela
    Nov 18, 2005
  3. Dan Sikorsky

    HOWTO: Disable TabStop For ImageButton

    Dan Sikorsky, Nov 16, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    504
    Calvin KD
    Nov 18, 2004
  4. trans.  (T. Onoma)
    Replies:
    0
    Views:
    165
    trans. (T. Onoma)
    Sep 25, 2004
  5. Domenic Padula

    VRuby tabstop question

    Domenic Padula, Sep 29, 2006, in forum: Ruby
    Replies:
    3
    Views:
    134
    Domenic P.
    Oct 12, 2006
Loading...

Share This Page