StringWriter sw = new StringWriter();
HtmlTextWriter w = new HtmlTextWriter(sw);
dvEDs.RenderControl(w);
string s = sw.GetStringBuilder().ToString();
//--------
<div id="dvEDs" runat="server">
<table width="100%" bgcolor="lime" align="left">
<tr><td colspan="2">
<img src="images/arrow.gif" /> Event Title : <asp:Label ID="lblEtitle" runat="server" CssClass="he testimonial" Text='<%#Bind("event_title")%>' Font-Bold="True"></asp:Label></td></tr>
<tr bgcolor="#FFF2F2"><td><img src="images/arrow.gif" /> Event Date : <asp:Label ID="lblEDate" runat="server" Text='<%#Bind("event_date")%>'></asp:Label></td><td><img src="images/arrow.gif" />
Time : <asp:Label ID="lblETime" runat="server" Text='<%#Bind("event_time")%>'></asp:Label></td></tr>
<tr bgcolor="#F1F4FE"><td><img src="images/arrow.gif" /> Event End Date : <asp:Label ID="lblEdEnd" runat="server" Text='<%#Bind("event_date_end")%>'></asp:Label></td><td><img src="images/arrow.gif" />
Time : <asp:Label ID="lbleEndTime" runat="server" Text='<%#Bind("event_time_end")%>'></asp:Label></td></tr>
<tr><td><img src="images/arrow.gif" /> Entry By : <asp:Label ID="lblentryBy" runat="server" Text='<%#Bind("entry_by")%>'></asp:Label></td><td><img src="images/arrow.gif" /> Attendit : <asp:Label ID="lblAttendit" runat="server" Text='<%#Bind("Attendit")%>'></asp:Label></td></tr>
<br />
<tr><td colspan="2"><img src="images/arrow.gif" /> Event Description :<span style="padding-left:1px;">
<asp:Label ID="Label1" runat="server"
Text='<%# Bind("event_dsn") %>' CssClass="tweet_text"></asp:Label></span></td></tr>
</table>
</div>
//----------------
output//----------------
<div id="ctl00_ContentPlaceHolder1_dvEDs">
<table width="100%" bgcolor="lime" align="left">
<tr><td colspan="2">
<img src="images/arrow.gif" /> Event Title : <span id="ctl00_ContentPlaceHolder1_lblEtitle" class="he testimonial" style="font-weight:bold;">mahesh area</span></td></tr>
<tr bgcolor="#FFF2F2"><td><img src="images/arrow.gif" /> Event Date : <span id="ctl00_ContentPlaceHolder1_lblEDate">Jul 18, 2012</span></td><td><img src="images/arrow.gif" />
Time : <span id="ctl00_ContentPlaceHolder1_lblETime">6:11:00 PM </span></td></tr>
<tr bgcolor="#F1F4FE"><td><img src="images/arrow.gif" /> Event End Date : <span id="ctl00_ContentPlaceHolder1_lblEdEnd">Jul 19, 2012</span></td><td><img src="images/arrow.gif" />
Time : <span id="ctl00_ContentPlaceHolder1_lbleEndTime">7:11:00 PM </span></td></tr>
<tr><td><img src="images/arrow.gif" /> Entry By : <span id="ctl00_ContentPlaceHolder1_lblentryBy">mahesh</span></td><td><img src="images/arrow.gif" /> Attendit : <span id="ctl00_ContentPlaceHolder1_lblAttendit">aytreayr</span></td></tr>
<br />
<tr><td colspan="2"><img src="images/arrow.gif" /> Event Description :<span style="padding-left:1px;">
<span id="ctl00_ContentPlaceHolder1_Label1" class="tweet_text">sub sstring<br /></span></span></td></tr>
</table>
</div>
No comments:
Post a Comment