Exporting from c#.net I am getting a problem I have a form that when I export to excel as a result in excel Any ideas why is this happening I am including the ASP code below.
<%@ Page Language="C#" MasterPageFile="~/masterpages/Admin.master" AutoEventWireup="true" CodeFile="members-search-adv.aspx.cs" Inherits="masteradmin_members_search_adv" Title="LISA - Life Insurance Settlement" %>
<%@ Register TagPrefix="UC" TagName="Paging" Src="~/controls/Paging.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script type="text/javascript" src="sorttable.js"></script>
Go to <a href="members-search.aspx" class="link">Quick Search</a>
<h1>Contact Database - Advanced Search</h1>
<asp:Label ID="lblSearchCriteria" runat="server" Text="" ForeColor="blue"></asp:Label>
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" width="50%">
<table border="0" cellpadding="3" cellspacing="1" style="height: 214px; width: 101%;">
<tr>
<td class="form1" align="right"><strong>OpenSearch:</strong></td>
<td class="form2">
<asp:TextBox ID="txtSearch" runat="server" CssClass="fields" Width="245px" ></asp:TextBox><b>*</b> <br><b>*</b><small>Search By Company Name, First Name, Last Name, Tags, Comments</small></td>
</tr>
<tr>
<td class="form1" align="right"><strong>Industry Segment:</strong></td>
<td class="form2"><asp:DropDownList ID="ddlIndSegment" runat="server" CssClass="fields" /></td>
</tr>
<tr>
<td class="form1" align="right"><strong>Member Type:</strong></td>
<td class="form2"><asp:DropDownList ID="ddlMemberType" runat="server" CssClass="fields" /></td>
</tr>
<tr>
<td class="form1" align="right"><strong>Member Rep only:</strong></td>
<td class="form2"><asp:CheckBox ID="cbxMemberRep" runat="server" /></td>
</tr>
<tr>
<td class="form1" align="right"><strong>Board Only:</strong></td>
<td class="form2"><asp:CheckBox ID="cbxBoardOnly" runat="server" /></td>
</tr>
<tr>
<td colspan="2" align="right">
<asp:ImageButton ID="btnSearch" runat="server" ImageUrl="/RadControls/images/bu_search.jpg" />
</td>
</tr>
</table>
</td>
<td> </td>
<td valign="top" width="50%">
<%--split the table here--%>
<table border="0" cellpadding="3" cellspacing="1"
style="width: 98%; margin-left: 0px;">
<tr>
<td class="form1" align="right"><strong>Suspended Only:</strong></td>
<td class="form2"><asp:CheckBox ID="cbxSuspended" runat="server" /></td>
</tr>
<tr>
<td class="form1" align="right"><strong>Active Only:</strong></td>
<td class="form2"><asp:CheckBox ID="cbxActiveOnly" runat="server" /></td>
</tr>
<tr>
<td class="form1" align="right"><strong>Allow Other Members To See My Info Only:</strong></td>
<td class="form2"><asp:CheckBox ID="cbxAllowOtherMembers" runat="server" /></td>
</tr>
<tr>
<td class="form1" align="right"><strong>State:</strong></td>
<td class="form2"><asp:DropDownList ID="ddlState" runat="server" CssClass="fields" /></td>
</tr>
<tr>
<td class="form1" align="right"><strong>By Special Level:</strong></td>
<td class="form2"><asp:DropDownList ID="ddlSpecialLevel" runat="server" CssClass="fields" /></td>
</tr>
<tr>
<td class="form1" align="right"><strong>Sort by:</strong></td>
<td class="form2">
<asp:DropDownList ID="ddlSortBy" runat="server" CssClass="fields">
<asp:ListItem Value="CompanyName">Company</asp:ListItem>
<asp:ListItem Value="FirstName">First Name</asp:ListItem>
<asp:ListItem Value="LastName">Last Name</asp:ListItem>
<asp:ListItem Value="MemberCategoryId">Membership Type</asp:ListItem>
<asp:ListItem Value="IndustrySegmentId">Industry Segment</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table border="0" cellpadding="3" cellspacing="1" width="100%">
<tr>
<td><asp:Literal ID="litTotalCount" runat="server" /></td><td align=left class="form3">
<asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" />
<asp:LinkButton ID="LinkButton1" runat="server" onclick="LinkButton1_Click">Export To Excel</asp:LinkButton>
<small>* Click on the column to SORT</small></td></tr>
</table>
<asp:Repeater ID="rptList" runat="server">
<HeaderTemplate>
<table class="sortable" border="0" cellpadding="3" cellspacing="1" width="100%">
<tr>
<td align="left" valign="top" class="form1"><b>Company</b></td>
<td align="left" valign="top" class="form1"><b>First Name</b></td>
<td align="left" valign="top" class="form1"><b>Last Name</b></td>
<td align="left" valign="top" class="form1"><b>Email</b></td>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td class="form2" align="left" valign="top"><asp:HyperLink ID="hlCompany" runat="server" CssClass="link"></asp:HyperLink></td>
<td class="form2" align="left" valign="top"><asp:HyperLink ID="hlFirstName" runat="server" CssClass="link"></asp:HyperLink></td>
<td class="form2" align="left" valign="top"><asp:HyperLink ID="hlLastName" runat="server" CssClass="link"></asp:HyperLink></td>
<td class="form2" align="left" valign="top"><asp:HyperLink ID="hlEmail" runat="server" CssClass="link"></asp:HyperLink> </td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
<asp:GridView ID="GridView2" runat="server">
</asp:GridView>
<asp:PlaceHolder ID="PlaceHolder1" runat="server"><br />
<UC:Paging Id="ctlPaging" runat="server" />
</asp:PlaceHolder>
<%-- <div align="center">
<br /><UC:Paging Id="ctlPaging" runat="server" />
</div>--%>
</asp:Content>