Thanks Marc,
I got it working:
Added this to the codebehind load of screen:
txtSearchText.Attributes.Add("onfocus", "SetSelected();")
Then add this to the html of the aspx page:
function SetSelected()
{
document.Form1.txtSearchText.select();
}
Thanks for the reply
Harry
"Marc Hoeppner" <ma**********@hotmail.com> wrote in message
news:ey**************@TK2MSFTNGP11.phx.gbl...
Hi,
you should be able to use JScript with ASP.NET just fine, in fact you need
JScript to do what you want. What was the problem with the Jscript in
combination with ASP.NET?
Best regards,
Marc Höppner
NeoGeo
"Harry Simpson" <hs*******@nospamphgt.net> wrote in message
news:Ov**************@tk2msftngp13.phx.gbl... I've got a server-side textbox that receives the focus when the page
loads. It has the text "Refine your Search" in the textbox. Obviously the user
needs to highlight the "Refine your Search" section to replace this with
thier text.
I've googled and found javascript (which doesn't seem to work with the
server side control).
Is there a way to do this with ASPNET??
TIA
Harry