Monday, September 28, 2009

DesignMode - fix body tag as literal control

Sometimes, you might want to put html body tag in a literal control. Then you lost intellisense from Visual Studio. You can use DesignMode property to fix it:

<% If DesignMode Then%><body>

<%

Else%>

<asp:Literal ID="litBodyTag" runat="server" />

<% End If%>

blog comments powered by Disqus