2 Basic Questions

S

Samuel Shulman

1. How can I set a button/image as the default so when the user will press
on the enter button that specified button/image will receive the event

2. Is there a method that will insert the cursor into a textbox (or set the
focus to any other control)

Thank you,
Samuel
 
B

Bruno Alexandre

under ASP.NET 2.0

inside the <form> tag just add the
defaultbutton="mySubmitButton" defaultfocus="myTextbox"

this answer your two questions :)
 
S

Samuel Shulman

Hi


I actually use 1.1

Bruno Alexandre said:
under ASP.NET 2.0

inside the <form> tag just add the
defaultbutton="mySubmitButton" defaultfocus="myTextbox"

this answer your two questions :)
 
J

Jose Rodriguez

Samuel, then use javascript for the focus. something along the following
lines

function setFocus(id)
{
//document.all["textUserName"].focus()
document.all[id].focus()
}

and cally from the body tag with the onload event
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top