日期:2014-05-17  浏览次数:20453 次

asp.net vs2008,gridview导出excel时如何取消其中的超链接?注意:不是模板列
gridview的前台代码:
<asp:GridView ID="GridView1" runat="server" Width="1024px"
                AutoGenerateColumns="False" AllowPaging="True" 
                onpageindexchanging="GridView1_PageIndexChanging" 
                onrowdatabound="GridView1_RowDataBound" PageSize="20">            
            <RowStyle HorizontalAlign="Center" />
            <Columns>
                <asp:BoundField DataField="ID" Visible="false" />
                <asp:BoundField HeaderText="序號" />
                <asp:HyperLinkField DataTextField="EXCEPTION_NO" HeaderText="單號" 
                    DataNavigateUrlFields="ID" 
                    DataNavigateUrlFormatString="~/Details.aspx?ID={0}" />
                <asp:BoundField DataField="CREATE_BY" HeaderText="填單人" />
                <asp:BoundField DataField="CREATE_DATE" HeaderText="填單時間" DataFormatString="{0:d}" />
                <asp:BoundField DataField="CREATE_CLASS" HeaderText="課別" />                    
                <asp:BoundField DataField="EXCEP_SYS" HeaderText="異常系統" />                
                <asp:TemplateField HeaderText="問題描述">
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("EXCEPTION_DESC") %>' ToolTip=<%# Eval("EXCEPTION_DESC")%>></asp:Label>
                    </ItemTemplate>                  
                </asp:TemplateField>
                <asp:BoundField DataField="SOLUTION" HeaderText="解決辦法" />
 &nb