No .. It would require a postback .. remember you do not have a persistent
connection (the code that handles this needs to be run in the browser not on
the server).
Writing a javascript function to do this is quite simple though.
document.forms[0].youritem.focus();
Remember that ASP.NET mangles names so you will want clientid from the
server side.
Cheers,
Greg
"Antonio" <An*****@discussions.microsoft.comwrote in message
news:F7**********************************@microsof t.com...
Greg, I have no JavaScript experience and just started working on .NET.
Isn't there something easier? Something like it is used for Windows Forms
(GotFocus)?
"Greg Young" wrote:
>It is the exact same process (in fact the work isn't really being done in
VB.NET or C#)
the key thing to notice is that it is just using javascript (it uses
getElementById() then calls focus() on the item).
Cheers,
Greg
"Antonio" <An*****@discussions.microsoft.comwrote in message
news:F3**********************************@microso ft.com...
Hi, Greg, thank you for your reply. I am however using C#
"Greg Young" wrote:
http://www.ferrysoft.com/developmenthowtosetfocus.htm should help you
out.
Cheers,
Greg Young
MVP - C#
http://codebetter.com/blogs/gregyoung
"Antonio" <An*****@discussions.microsoft.comwrote in message
news:84**********************************@microso ft.com...
Hello, everyone...I am working on a web form and I am trying to set
the
focus
to a button when the cursor is placed in a certain textbox.
Can someone point me to the right direction?
Thanks