I just converted a web site project to a web application project. One issue I am having is custom web server control is not being recognized in the aspx file. In code behind the class is recognized. In the web site project this worked fine. In the web.config
I have it registered the same way I did in the web site project. Any ideas why this now does not work?
It's actually not a user control (ie a .ascx file). It's a server control defined in a class file. In the previous website project it was in App_Code NOT a separate assembly. Now when I converted the website project to the web application project type
it is not recognized.
Yes. that worked. thanks for the feedback. For some reason it was not dawning on me that I had to added the current project assembly name on the register tag in the web.config. Coming from web site projects that was not something I was used to.
dsa1971
Member
142 Points
144 Posts
custom server control tag not recognized in aspx page
Dec 05, 2012 05:16 PM|LINK
I just converted a web site project to a web application project. One issue I am having is custom web server control is not being recognized in the aspx file. In code behind the class is recognized. In the web site project this worked fine. In the web.config I have it registered the same way I did in the web site project. Any ideas why this now does not work?
<add tagPrefix="custom" namespace="custom.Web" />Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: custom server control tag not recognized in aspx page
Dec 06, 2012 07:17 AM|LINK
Hello,
Please delete your auto-generated codes for registration, and then re-drag and re-drop the user controls onto the WebForm and then do coding.
dsa1971
Member
142 Points
144 Posts
Re: custom server control tag not recognized in aspx page
Dec 10, 2012 12:24 PM|LINK
It's actually not a user control (ie a .ascx file). It's a server control defined in a class file. In the previous website project it was in App_Code NOT a separate assembly. Now when I converted the website project to the web application project type it is not recognized.
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: custom server control tag not recognized in aspx page
Dec 11, 2012 12:07 AM|LINK
Yes, when you compile your whole project it should be shown directly on the ToolBox and you can drag and drop onto the web page.
dsa1971
Member
142 Points
144 Posts
Re: custom server control tag not recognized in aspx page
Dec 12, 2012 12:52 PM|LINK
Yes. that worked. thanks for the feedback. For some reason it was not dawning on me that I had to added the current project assembly name on the register tag in the web.config. Coming from web site projects that was not something I was used to.