Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Default behavor

Reply
Thread Tools

Default behavor

 
 
Randel Bjorkquist
Guest
Posts: n/a
 
      03-29-2005
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


 
Reply With Quote
 
 
 
 
Steve C. Orr [MVP, MCSD]
Guest
Posts: n/a
 
      03-29-2005
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/20...200406so_f.asp

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


"Randel Bjorkquist" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
 
 
 
Randel Bjorkquist
Guest
Posts: n/a
 
      03-29-2005
Hey Steve,

Thanks for all the information.

Randel

"Steve C. Orr [MVP, MCSD]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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/20...200406so_f.asp
>
> --
> I hope this helps,
> Steve C. Orr, MCSD, MVP
> http://Steve.Orr.net
>
>
> "Randel Bjorkquist" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: strange behavor.... Mark Wooding Python 28 11-16-2010 02:29 PM
Re: strange behavor.... alex23 Python 3 11-14-2010 03:20 AM
Default Mozilla isn't default! Help! M. FERRANTE Firefox 1 07-27-2005 09:07 AM
extremely strange behavor, not able to retrive an form through getElementById Zhang Weiwu Javascript 4 07-02-2005 07:31 AM
automatic default route propagation into RIP: default metric Ben Low Cisco 2 12-28-2003 03:57 AM



Advertisments