Hi Souri, I tried that many times before with asp.net 2 beta 2 and it
doesn't work. It worked ok when I used asp.net 1.x. Problem is that asp.net
2 is rendering something like amp&; instead of just & and then the
javascript is not correct. I have tried many different options but none have
worked.
The built in default button property is just for one buton but I have like
five pairs textbox-imagebutton.
thanks,
alex.
"souri challa" <so*********@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Alex,
You can register a java script that looks like below to get what you
need.
TextBox1.Attributes.Add("onkeydown", "javascript:if((event.which &&
event.which == 13) || (event.keyCode && event.keyCode ==
13)){document.all." + ImageButton.ClientID + ".click();return
false;}else return true;");
You can use the following free control too.
http://www.metabuilders.com/tools/DefaultButtons.aspx
Asp.net 2.0 has the default button property built in.
HTH,
Souri Challa