what rules does designer.cs generation use
Folks,
what are the rules governing the generation of declarations in the designer.cs file in an asp.net project?
for example, I have
- myfile.resx, - myfile.aspx, - myfile.aspx.cs.these generate
- myfile.aspx.designer.cswhich defi开发者_运维知识库nes things like protected global::system.web.ui.webcontrols.literal blahblah; for my resources.
but until I reference something in myfile.aspx, it wont show up in the generated designer.cs, even if I'm refering to it in my myfile.cs (the codebehind class).
how can I force this, without taking ownership of that designer.cs file?
context: I have a someresource.text in my aspx, which i am constructing out of a bunch of other resources, which is why they dont show up explicitly in the aspx.
The only declarations within a designer file are for the server side controls explicitly declared on the aspx during design time. AFAIK, absolutely nothing else will be added to the designer file.
Remember, the designer file is only a partial class that specifically declares controls for use in your code-behind (which is also a partial class). It is only there to aid wiring up all your controls.
精彩评论