Inline code in templated controlshttp://forums.asp.net/t/1785510.aspx/1?Inline+code+in+templated+controlsWed, 28 Mar 2012 01:39:10 -040017855104900451http://forums.asp.net/p/1785510/4900451.aspx/1?Inline+code+in+templated+controlsInline code in templated controls <p>Hi, everyone.</p> <p>I want my custom templated control to support inline code blocks. eg.</p> <p>&lt;mc:MyControl id=&quot;xxx&quot; runat=&quot;server&gt;<br> &lt;ItemTemplate&gt;<br> &lt;div&gt;&lt;%=&quot;Inline code goes here&quot; %&gt;&lt;/div&gt;<br> &lt;/ItemTemplate&gt;<br> &lt;/mc:MyControl&gt;<br> <br> How do I do it?<br> <br> Thank you in advance.<br> <br> P.S. I know about data binding and know that &lt;%<span style="color:red; font-weight:bold">#</span>SomePublicVariableDefinedOnAspxCS %&gt; will work&nbsp;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;but I really need&nbsp;it to be&nbsp;&lt;%<span style="color:red; font-weight:bold">=</span>SomePublicVariableDefinedOnAspxCS %&gt;</p> 2012-03-26T21:30:23-04:004900460http://forums.asp.net/p/1785510/4900460.aspx/1?Re+Inline+code+in+templated+controlsRe: Inline code in templated controls <p>Forget it.</p> <p>It didn't work because I have a collection of ItemTempate and the collection &quot;cannot be modified because the control contains code blocks&quot;</p> <p>Being stupid is not easy <img title="Laughing" border="0" alt="Laughing" src="http://forums.asp.net/scripts/tiny_mce/plugins/emotions/img/smiley-laughing.gif"></p> 2012-03-26T21:42:15-04:004902735http://forums.asp.net/p/1785510/4902735.aspx/1?Re+Inline+code+in+templated+controlsRe: Inline code in templated controls <p></p> <blockquote><span class="icon-blockquote"></span> <h4>never_again</h4> <p></p> <p>Forget it.</p> <p>It didn't work because I have a collection of ItemTempate and the collection &quot;cannot be modified because the control contains code blocks&quot;</p> <p>Being stupid is not easy <img title="Laughing" border="0" alt="Laughing" src="http://forums.asp.net/scripts/tiny_mce/plugins/emotions/img/smiley-laughing.gif"></p> <p></p> </blockquote> <p></p> <p>Congratulations that you've solved your problemwelcome to our forum next time to share your nice solution or chat with us about ASP.NET</p> <p>Reguards</p> 2012-03-28T01:39:10-04:00