Results 1 to 2 of 2

Thread: LinkButton in a User Control

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2003
    Posts
    90

    LinkButton in a User Control

    This seems like an easy task, but I have not been able to solve it or find anything in this forum about it. Perhaps my verbaige is not correct..

    I have a User control (menu bar) that has a link button on it. For some reason this button becomes the default button every time the aspx page displays. Meaning, when you hit the enter key this button is what fires. How do I control this? I really do not want this button to be the default. I have a button on my aspx page that needs to be the default. I have tried setting the tabindex to 0 and also -1 with no effect.

    Thanks for any help

  2. #2
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704
    Forget about tabindex, that will get you no where. I seriously don't understand why tabindex is even in the list of properties, because it has never done anything productive at all.

    Here's what matters to a browser as far as tab indexes:

    Whatever gets rendered first get the first tab focus. Anything after that follows on down the chain.

    So it is likely your LinkButton is the first control you are rendering on your aspx page. In order to to make it not the first, you have to render it after a different 'input' field. That other 'input' field will now get focus first.

    so move it declarations underneath a different control (that accepts input like a Button, Linkbutton, textbox..etc)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width