Setting Focus

Results 1 to 2 of 2

Thread: Setting Focus

  1. #1
    Join Date
    Dec 1969

    Default Setting Focus

    How to Set the focus of a page to a particular conrol when the page reloads<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Setting Focus

    make the &#060;body&#062; tag a server side HTML control, a la:<BR><BR>[code language="VB.NET"]&#060;body id="bTag" runat="server"&#062;[/code]<BR><BR>and in code behind:<BR>[code language="VB.NET"]Protected WithEvents bTag As System.Web.UI.HtmlControls.HtmlGenericControl[/code]<BR><BR>and then add an "onLoad" event to it, like:<BR><BR>[code language="VB.NET"]bTag.Attributes.Add("onLoad","documents.forms[&#039;Form1&#039;][&#039;FieldName&#039;].focus();")[/code]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts