开发者

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.cs

which 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜