Click here to Skip to main content
15,898,222 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

Anyone know how to convert ASP.NET code to HTML at runtime. like it do in the VS IDE(Source to Design).
when i entered some code like below to a text box and click a button

<asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />

it should convert it to html and render the button.

Thanks in advance
Posted
Comments
Sandeep Mewara 23-Jul-11 14:18pm    
Can you elaborate why and where you are trying to do it?
.NET converts the ASPX pages designed and HTML based controls/page is returned when requested.

1 solution

Visual Studio probably ask the component to output itself in a stream.

Generally as IIS handle the translation, we seldom need to do that manually.

By the way, Visual Studio designer is far from perfect as complex layout often are quite different from the final layout someone would see in a browser.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900