B
Benton
Hi there,
I was using VS 2005 Beta 2 and was able to set the focus to any control on a
web form by calling its Focus() method, for instance:
btnContinue.Focus();
Today I upgraded to VS 2005 RTM and now I get an exception at runtime when
the code execution reaches the above line. The exception I get is this:
System.InvalidOperationException was unhandled by user code
Message="A form tag with runat=server must exist on the Page to use
SetFocus() or the Focus property."
Source="System.Web"
I did nothing to my project, and of course the control has a "runat=server"
attribute.
Any ideas?
Regards,
-Benton
I was using VS 2005 Beta 2 and was able to set the focus to any control on a
web form by calling its Focus() method, for instance:
btnContinue.Focus();
Today I upgraded to VS 2005 RTM and now I get an exception at runtime when
the code execution reaches the above line. The exception I get is this:
System.InvalidOperationException was unhandled by user code
Message="A form tag with runat=server must exist on the Page to use
SetFocus() or the Focus property."
Source="System.Web"
I did nothing to my project, and of course the control has a "runat=server"
attribute.
Any ideas?
Regards,
-Benton