Sunday, 15 May 2011

c# - Convert HTML table code to asp:table control -



c# - Convert HTML table code to asp:table control -

i have html table code (starts < table> , ends < /table>) , how can create asp web page add together table programmatically ?!

if have purely html code generated in server side, can add together html code having <table> asp page this.

add placeholder aspx page this.

<asp:placeholder id="plc" runat="server" />

in page_load event write this.

string str = "<table><tr><td>td value</td></tr></table>";

plc.controls.add(new literalcontrol(str));

this emit html code , , place them placeholder.

assumption readonly html code , wan show in page, not intended value in server side code on post back. nor there editable field within generated table.

c# html asp.net table

No comments:

Post a Comment