get focus

  • Thread starter Thread starter Michael Murschell
  • Start date Start date
M

Michael Murschell

how do I get a field to have the focus?

If I have an <asp:textbox id=fld1 runat=server>

I want to say something like,

fld1.getFocus()

but that is not it.

I know I am just missing something simple, but I can't figure out what it
is.
 
Hi Michael,

I still did not get it work in the vb.net code, but if you paste this in the
HTML file I think it will work.

//This should be the last rows in your html aspx file

<script language="JavaScript">
fld1.focus();
</script>
</HTML>

I did not test this with a server control, but I would not know why this
would not work, otherwise thry "document all". Or tell me, than I try.

I hope this helps a little bit?

Cor
 
Back
Top