What rules does designer.cs use?

People,

What are the rules for generating ads in the designer.cs file in an asp.net project?

for example, I have - myfile.resx,
 - myfile.aspx,
 - myfile.aspx.cs.

they generate - myfile.aspx.designer.cs

which defines things like protected global :: system.web.ui.webcontrols.literal blahblah; for my resources.

but until I refer to something in the myfile.aspx file, it will not appear in the generated designer.cs file, even if I refer to it in myfile.cs (class codebehind).

how can i force this without taking responsibility for this designer.cs file?

context: I have someresource.text in my aspx, which I create from many other resources, so they are not explicitly displayed in aspx.

+5
source share
1 answer

The only declarations in the designer file are for server-side controls explicitly declared on aspx during development. AFAIK, absolutely nothing will be added to the constructor file.

Remember that the constructor file is just a partial class that specifically declares controls for use in your code (which is also a partial class). It only helps you connect all your controls.

+1
source

All Articles