Monday, 14 September 2009

ASP.NET - VIEWASTEXT Attribute


If you have a control on an ASP.NET page and Visual Studio is having trouble rendering it in design view, then you can add the VIEWASTEXT attribute to the tag, and visual studio will then render this as text.

Example:
<object id=factory style="display:none"
classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814"
  codebase="smsx.cab#Version=6,5,439,30 VIEWASTEXT>

    <param name="template" value="MeadCo://IE7" />
</object>

No comments: