Wednesday, May 9, 2007

Ajax control intellisense did't work in Content Page??

Ajax control intellisense did't work in Content Page?? showing red underline in ScriptManager, UpdatePanel and ContentTemplate tags have the little red-squiggly lines underneath them...

http://weblogs.asp.net/scottgu/archive/2006/11/16/gotcha-lost-html-intellisense-within-asp-net-ajax-controls.aspx


The problem apparently comes from a failed attempt to wrap all AJAX controls with same asp: prefix as it is with the regular ASP.NET controls. So once you teach AJAX not to use asp: prefix, but for example the good ol' atlas:, confusion disappears and things start working fine again.

To fix that, you need to visit web.config, section system.web / pages / controls and replace all tagPrefix="asp" attributes with, for example, tagPrefix="atlas". After that, you need to use the same prefix throughout the application, thus no more asp:UpdatePanel, but atlas:UpdatePanel. After this operation intellisense starts working again, and no more screwed up markup or compilation errors.

No comments: