Jenish Patel
Jenish Patel

Reputation: 48

I am just trying to display ASP.NET markup in my webpage

I am just trying to display ASP.NET markup in my webpage.

I want to display

<asp:Button runat="server" ID="MyID" CssClass="btn" Text="SUBMIT" /> 

This code in html div tag. What should I do?

I tried using the <pre> tag but it does not work:

<pre>
    <asp:Button runat="server" ID="MyID" CssClass="btn" Text="SUBMIT" />
</pre>

Upvotes: 0

Views: 35

Answers (1)

wazz
wazz

Reputation: 5068

Change < and > to html entity characters.

< becomes &lt;.
> becomes &gt;.

&lt;asp:Button runat="server" ID="MyID" CssClass="btn" Text="SUBMIT" /&gt; 

Upvotes: 1

Related Questions