Geeks With Blogs
Devin Rader's Blog I write the code...

Visual Studio 2002-2003 allows 3rd party control vendors to plug into the Visual Studio HTML Intellisense system through the use of XSD schemas.  If a control vendor provides a schema for their controls, then Visual Studio can use that schema to generate HTML Intellisense for you in the HTML designer.

Unfortunately, the system is not ideal, quite brittle, and quite dependent on the actual HTML that is present in the web page or user control.  As a control vendor this presents problems because we generally cannot depend on any specific HTML being present, especially in the case of user controls which are very free form.

The way that the Infragistics NetAdvantage ASP.NET controls currently provide Intellisense is by modifying the body tag in the web page to include an XML Namespace attribute that points to the XSD schema for the specific control.  You can have the control automatically make this modification for you by right clicking on the control and selecting the "Enable HTML Intellisense" option from the context menu.

You need to do this for each different type of NetAdvantage control on the webform, and unfortunately for each webform in your project, and as you can see for each control you enable Intellisense on, we add a xmlns attribute to the body tag:

As I stated earlier though, this method obviously would not work if the body tag is not present, which is generally the case for files like user controls.  In those cases, there is a manual workaround that enables you to provide HTML Intellisense for 3rd party server controls.  By adding the xmlns attribute and appropriate namespace value to some type of HTML container, like a p, div, or span tag which surrounds the server control, Visual Studio will be able to provide you with HTML Intellisense for the control:

Posted on Friday, November 4, 2005 7:32 AM | Back to top


Comments on this post: Enabling HTML Intellisense for 3rd party server controls

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Devin Rader | Powered by: GeeksWithBlogs.net