开发者

How register a subclass of a web control in an ASP.NET website?

开发者 https://www.devze.com 2023-01-30 19:52 出处:网络
I would like to subclass an ASP.NET control, like UpdatePanel, and use the subclass in my web site. I know if I move the code to a separate assembly I would be able to reference the assembly fro开发者

I would like to subclass an ASP.NET control, like UpdatePanel, and use the subclass in my web site. I know if I move the code to a separate assembly I would be able to reference the assembly fro开发者_开发百科m within Register phrase but I wonder if there is a way to keep all the code inside the website.

Would appreciate to have your help.


Sure, you can put code files in App_Code if you are using the web site project template, or if you are using the web application project template, the code can be within a folder in the web site.

Note that the name of the assembly in web site project templates is App_Code, and for web app projects its the name defined as the assembly name in the project settings.

Do you know which template you are using?

When it comes to custom controls, sometimes you may run into issues, especially if you want to change the existing behavior of updatepanel.

HTH.

0

精彩评论

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

关注公众号