I am applying a new version of an assembly to a web project and have found that I am going to have to replace about 500 instances of the Register Assembly tag at the top of each web control. I considered registering it in the web.config but when I try this and remove the "Register" tag from the controls, i receive the "unrecognized tag prefix" error as well as losing intellisense for that tag. I have not GAC'ed the assemblies but i didnt think that would a problem. What am I missing here? Thanks in advance for any help.
相关问题
- Carriage Return (ASCII chr 13) is missing from tex
- How to store image outside of the website's ro
- 'System.Threading.ThreadAbortException' in
- Request.PathInfo issues and XSS attacks
- How to dynamically load partial view Via jquery aj
相关文章
- asp.net HiddenField控件扩展问题
- asp.net HiddenField控件扩展问题
- Asp.Net网站无法写入错误日志,测试站点可以,正是站点不行
- asp.net mvc 重定向到vue hash字符串丢失
- FormsAuthenticationTicket expires too soon
- “Dynamic operations can only be performed in homog
- What is the best way to create a lock from a web a
- Add to htmlAttributes for custom ActionLink helper
Are you sure that you are building the config file correctly? Rick Strahl just wrote an excelent article on this very issue:
http://www.west-wind.com/WebLog/posts/753705.aspx
Usually when you embed a custom control into a page you need to add a @Register tag like so:
in order to get a control to work in the page and show up with Intellisense. If you’re using the visual designer to drop controls you probably won’t notice this requirement because the designer automatically adds the assembly and namespace dependency for you into the page. However if you work in markup only as I do mostly, it’s often annoying to first have to register the control on the top of the page and then go back to actually embedding the control into the page to get Intellisense.
An easier and application global way to do this is to declare your namespaces and control tags directly in web.config and have them apply globally:
The controls section is what provides effectively the equivalence of the @Register tag in pages and once you’ve defined the tag prefix there the @Register tag is no longer required in the page.
Hope that Helps,
Jim
I had to install VS 2005 Service Pack 1 and restart Visual Studio.