I know that there's always been issues with declaring server-side controls directly in HTML in Visual Studio. Usually, you have to open the page in design mode in order to get them generated in code behind so you can access via your code. But I do have a strange issue here. I added a asp:Label control on a page that inherits a master page.
<asp:Label ID="uxEnteteresultat" runat="server" Text="Test"></asp:Label>
These pages use a framework named Ext.Net
that generates Ext.js
code. My designer simply doesn't work, so there's no way I can get this control generated in the codebehind file.
And where are those controls declared ??? In older version of .Net (I'm in VS 2010 using 4.0 framework), we could see it in a partial class. Where are they now ? Is there a workaround to declare your control yourself in VS 2010 ?
Thanks !
There is no designer.cs files at all. It is a website, not a project. That might be a part of the problem...
In VS 2010 each Form should have three parts:
MyForm.aspx
MyForm.aspx.cs
MyForm.aspx.designer.cs
You should be able to add a Label like so:
Add this to
MyForm.aspx
:Add this to
MyForm.aspx.designer.cs
(withinpublic partial class
):