> See if RegisterOnSubmitStatement works for you:
(http://msdn.microsoft.com/library/de...-us/cpref/html
/frlrfSystemWebUIPageClassRegisterOnSubmitStatement Topic.asp).
I found another workaround - the answer to the whole thing ended up
being: turn off Smart Navigation. It was screwing everything up. I
couldn't set the values of server side controls from javascript, among
other things. The values would stay the same they were when the form
first initilaized. When I turned off smart navigation, these problems
went away.
To force focus to a particular control, I found this worked:
In the HTML body:
<body onload="javascript
:eval(document.Form1.txtJavascri pt.value);">
In control's Autopostback event:
Private Sub Text1_TextChanged(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Text1.TextChanged
'(your code here)
'...
txtJavascript.Value = "document.Form1." & Text2.UniqueID &
".focus();"
End Sub ' Text1_TextChanged
Note: I haven't tried registerClientsideScript (or is it
registerStartupScript? I forget at the moment). They didn't work when
I had smartnavigation on but might with it off. Is this preferable to
the above method?