Default focus on web form

agua2o

New Member
hello...i have aspx page with custom web control on top (menu bar with close button) and aftert that some table and submit button. When page gets loaded focus is setted by default to chat close button in control (i think that because it is first elemnt on page) and if user press ENTER it logs out from system...<BR>Is there any way to change focus except writing manual javascript?Anything that is clientside like that you will have to use javascript. You can dynamically write your javascript though. Just use something like:<BR><BR>dim var as string<BR>var = "<script language=""JavaScript"">"<BR>var = var & "your javascript here"<BR>var = var & "</script>"<BR><BR>response.write var<BR><BR>Build it dynamically then write it where you want it in your html before it gets sent to the client. Then when the client gets it, it becomes good javascript.<BR><BR>hth.that's good...but is there any solution from Microsoft? it's not good solution...it works...but is seems the problem of microsoft...i was wonder is there any pure microsoft method or way...
 
Back
Top