Here is another idea:
In your base page that all your pages inherit from you can use:
================================================== ===
Public InitialFocus As Control
Protected Overridable Sub Page_PreRender(ByVal sender As Object, ByVal e As
EventArgs)
Dim sb As New StringBuilder
sb.Append("<script language='javascript'>")
If Not InitialFocus Is Nothing Then
sb.Append("document.getElementById('" & InitialFocus.ClientID &
"').focus();")
End If
sb.Append("</script>")
End Sub
================================================== ===
Then in Page_Load of your .aspx page you simply set the Property like this:
InitialFocus = txtVuid
================================================== ===
--
Joe Fallon
"starbuck" <st******@mbssoft.co.uk> wrote in message
news:eW*************@TK2MSFTNGP10.phx.gbl...
We have some fields with AutoPostBack set to true and when user tabs to
the next field the screen re-calculates correctly however we also lose which
control/text box had focus when the user tabbed.
Is there any way of storing and resting which control should have focus?
We are using asp.net with vb.net for code.
Thanks
---
Outgoing mail is certified Virus Free, so am I.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.688 / Virus Database: 449 - Release Date: 18/05/2004