focus

  • Thread starter Thread starter gabriel Morgulis
  • Start date Start date
G

gabriel Morgulis

How can I set the focus on a particular control in a
webform?

IE: If I have 3 textboxs controls on my webform and I
want to be on the middleone , how can I do it?
I saw that there is a method called focus, that it would
replace the .setfocus method of VB6.
But I don't understand the example.
Does anyone have an example ?
 
Hi Gabriel,

Till now I could not do it in vb.net and I think it will be difficult to
start it up from VB.net

Here is some piece of html/javascript code you can paste in your aspx page,
for me it does work.
\\\
<INPUT tabindex="1" id="fieldid" type="text" size="27">
///
This script has to be exact before the end HTML tag.
(That is the reason I think starting it up from vb will not succeed, because
than you go to the load event, but I did not try that till now).
\\\
<script language="JavaScript">
fieldid.focus();
</script>
</HTML>
///
I hope this helps a little bit?

Cor
 
* "gabriel Morgulis said:
How can I set the focus on a particular control in a
webform?

IE: If I have 3 textboxs controls on my webform and I
want to be on the middleone , how can I do it?
I saw that there is a method called focus, that it would
replace the .setfocus method of VB6.
But I don't understand the example.
Does anyone have an example ?

Call its 'focus' method, for example in a VBScript or JScript.
 
Back
Top