G
Guest
Hi there
I am trying to introduce some dynamic control focus in to my asp application
by turning the <body> of the aspx file in to an HTML Server control.
I have read elsewhere that if you assign an ID to the <body> as well as
runat="server" : e.g.
<body id="PageBody" runat="server">
you should then be able to use:
PageBody.Attributes("onload") = "document.forms[0] ['TextBox'].focus();"
for example to shift focus on to certain controls when you want...
All good
My problem is that when you assign an ID and runat="server" to the <body> it
is not automatically declared in the aspx.vb file as you would normally get
if you simply drag an asp control on to the designer page. Obviously I am
guilty of relying on the automation normally - but how do I declare PageBody
in the aspx.vb... what do I declare it as ???
Your help is much appreciated
I am trying to introduce some dynamic control focus in to my asp application
by turning the <body> of the aspx file in to an HTML Server control.
I have read elsewhere that if you assign an ID to the <body> as well as
runat="server" : e.g.
<body id="PageBody" runat="server">
you should then be able to use:
PageBody.Attributes("onload") = "document.forms[0] ['TextBox'].focus();"
for example to shift focus on to certain controls when you want...
All good
My problem is that when you assign an ID and runat="server" to the <body> it
is not automatically declared in the aspx.vb file as you would normally get
if you simply drag an asp control on to the designer page. Obviously I am
guilty of relying on the automation normally - but how do I declare PageBody
in the aspx.vb... what do I declare it as ???
Your help is much appreciated