Editing a page in VS 2005 - add a control and it's not in the code behind.

  • Thread starter Thread starter UJ
  • Start date Start date
U

UJ

I've got a web page I'm working on. I add some control through the HTML with
runat="server" and when I switch to code view, they aren't defined. Do I
have to define them myself? It doesn't seem to need to do that when you are
first creating the page.

TIA - Jeff.
 
If you edit them in HTML view, change the page to designer view next. That
enables VS to build the control list and assign the proper variables for
them so they'll be accessed in codebehind.
 
Back
Top