prasanna kumar

prasanna kumar

  • NA
  • 41
  • 7.5k

While exporting repeater to excel ASP.NETC# getting HTML Tag

Aug 2 2019 4:33 AM
my asps file Customer.aspx
  1. <asp:UpdatePanel runat="server" ID="updpnl">  
  2.     <ContentTemplate>  
  3.         <asp:Panel runat="server" ID="Panelmapdetail" Height="280px" ScrollBars="Auto">  
  4.             <table class="table table-hover table-nomargin table-colored-header">  
  5.                 <thead>  
  6.                     <tr>  
  7.                         <th>UniqID</th>  
  8.                         <th>Customer Name</th>  
  9.                         <th>Product1</th>  
  10.                         <th>Product2</th>  
  11.                         <th>Product3</th>  
  12.                         <th></th>  
  13.                     </tr>  
  14.                 </thead>  
  15.                 <tbody>  
  16.                     <asp:Repeater runat="server" ID="rptrStudMarksDetails">  
  17.                         <ItemTemplate>  
  18.                             <tr>  
  19.                                 <td style="display:none"><asp:Label ID="lbCustomerProduct" runat="server" Text='<%#Eval("CustomerProduct") %>'></asp:Label></td>  
  20.                                 <td><%#Eval("UniqID") %></td>  
  21.                                 <td><%#Eval("Customer Name") %></td>  
  22.                                 <td><%#Eval("Product1") %></td>  
  23.                                 <td><%#Eval("Product2") %></td>  
  24.                                 <td><%#Eval("Product2") %></td>  
  25.                             </tr>  
  26.                         </ItemTemplate>  
  27.                     </asp:Repeater>  
  28.                 </tbody>  
  29.             </table>  
  30.         </asp:Panel>  
  31.     </ContentTemplate>  
  32. </asp:UpdatePanel>  
  33. <asp:LinkButton runat="server" ID="lbnExport" OnClick="lbnExport_Click">Export to Excel</asp:LinkButton> 
my aspx.cs file customer.aspx.cs
 
 
my output
 

Answers (1)