Default behavor

Discussion in 'ASP .Net Web Controls' started by Randel Bjorkquist, Mar 29, 2005.

  1. I'm trying to figure out how to stop one of the Button on my WebForm, from
    activating its OnClick event when I press the "Enter" key while entering
    data in a TextBox. If I disable it, the control/focus goes to another
    Button and that Button then has the same thing happen.

    I know there must be a way of not allowing this. I just haven't found it.
    Can anyone help me?

    Thanks,

    Randel Bjorkquist
     
    Randel Bjorkquist, Mar 29, 2005
    #1
    1. Advertising

  2. I agree the default behavior is less than intuitive and sometimes quite
    annoying.

    You could use this free control to solve the problem.
    http://www.metabuilders.com/tools/DefaultButtons.aspx

    If you prefer a more manual approach, here are a couple good articles on the
    subject:
    http://www.allasp.net/enterkey.aspx
    http://www.aspnetpro.com/features/2004/06/asp200406so_f/asp200406so_f.asp

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://Steve.Orr.net


    "Randel Bjorkquist" <> wrote in message
    news:...
    > I'm trying to figure out how to stop one of the Button on my WebForm, from
    > activating its OnClick event when I press the "Enter" key while entering
    > data in a TextBox. If I disable it, the control/focus goes to another
    > Button and that Button then has the same thing happen.
    >
    > I know there must be a way of not allowing this. I just haven't found it.
    > Can anyone help me?
    >
    > Thanks,
    >
    > Randel Bjorkquist
    >
     
    Steve C. Orr [MVP, MCSD], Mar 29, 2005
    #2
    1. Advertising

  3. Hey Steve,

    Thanks for all the information.

    Randel

    "Steve C. Orr [MVP, MCSD]" <> wrote in message
    news:...
    >I agree the default behavior is less than intuitive and sometimes quite
    >annoying.
    >
    > You could use this free control to solve the problem.
    > http://www.metabuilders.com/tools/DefaultButtons.aspx
    >
    > If you prefer a more manual approach, here are a couple good articles on
    > the subject:
    > http://www.allasp.net/enterkey.aspx
    > http://www.aspnetpro.com/features/2004/06/asp200406so_f/asp200406so_f.asp
    >
    > --
    > I hope this helps,
    > Steve C. Orr, MCSD, MVP
    > http://Steve.Orr.net
    >
    >
    > "Randel Bjorkquist" <> wrote in message
    > news:...
    >> I'm trying to figure out how to stop one of the Button on my WebForm,
    >> from activating its OnClick event when I press the "Enter" key while
    >> entering data in a TextBox. If I disable it, the control/focus goes to
    >> another Button and that Button then has the same thing happen.
    >>
    >> I know there must be a way of not allowing this. I just haven't found
    >> it. Can anyone help me?
    >>
    >> Thanks,
    >>
    >> Randel Bjorkquist
    >>

    >
    >
     
    Randel Bjorkquist, Mar 29, 2005
    #3
    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. micky

    default.mspx or default.do

    micky, Dec 16, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    505
    Andrew Robinson
    Dec 17, 2005
  2. Gaetan
    Replies:
    3
    Views:
    1,458
    Juan T. Llibre
    Feb 14, 2006
  3. alex23

    Re: strange behavor....

    alex23, Nov 13, 2010, in forum: Python
    Replies:
    3
    Views:
    188
    alex23
    Nov 14, 2010
  4. Mark Wooding

    Re: strange behavor....

    Mark Wooding, Nov 13, 2010, in forum: Python
    Replies:
    28
    Views:
    590
    Steve Holden
    Nov 16, 2010
  5. Zhang Weiwu
    Replies:
    4
    Views:
    114
Loading...

Share This Page