Actually, I type all my controls in HTML View because I don't like to work with the form designer. Yet in spite of that, VS often manages to "see" them and place them into the codebehind.
"Steve C. Orr, MCSD" <SteveOrr.net> wrote in message news:OQ9BI3WUDHA.1624TK2MSFTNGP11.phx.gbl...
If you drag the control from the toolbox then it should always put the declaration in the code behind for you, assuming such an action is valid for that control. For instance, if you drag an HTML control instead of a webform and you don't mark it as a server control then the definition will not be in the code behind because it's not valid to be there.
Also, if you type in the control definition into the HTML view of your page (instead of dragging it from the toolbar onto the designer view of your form) then I wouldn't expect VS.NET to automatically put the definition into the code behind for you.
I hope this helps,
Steve C. Orr, MCSD
"Boban Dragojlovic" <news_N_O_S_P_AM_dragojlovic.org> wrote in message news:g6ETa.47$uP7.7666802newssvr14.news.prodigy.c om...
I create a new webform (I always use codebehind), and I insert some server-side controls into the form (the ASPX)
Later, I switch to codeview, and I notice that some (sometimes all) of the controls I created have been automatically defined for me in the
#Region " Web Form Designer Generated Code "
Later, when I add more controls this no longer happens.
First, I'm wondering which of my actions causes it to no longer do this;
is there a command I can issue to force it to "review" the ASPX page and re-synchronize the codebehind form?