我已經跟隨GridView和我的源代碼如下所示:鏈接按鈕的GridView
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ShopData.ascx.cs" Inherits="usercontrols.UsercontrolsShopData" %>
<asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click">Export to csv</asp:LinkButton>
<br /> <br />
<asp:GridView ID="gridviewShopData" runat="server" DataSourceID="SqlDataSource1" CellPadding="4" BackColor="White" BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px">
<FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
<HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
<PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />
<RowStyle BackColor="White" ForeColor="#330099" />
<SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
<SortedAscendingCellStyle BackColor="#FEFCEB" />
<SortedAscendingHeaderStyle BackColor="#AF0101" />
<SortedDescendingCellStyle BackColor="#F6F0C0" />
<SortedDescendingHeaderStyle BackColor="#7E0000" />
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" SelectCommand="SELECT firstName as 'First Name',lastName as 'Last Name',employeeNumber as 'Employee Number',productID as 'Product Number' FROM ShopOrder where [email protected]">
<SelectParameters><asp:QueryStringParameter Name="pageid" QueryStringField="id"/></SelectParameters>
</asp:SqlDataSource>
我想要做的第一列的值鏈接按鈕鏈接到一個url..how我可以讓這個?
你可以檢查你的問題,並告訴我們wh這個問題出現了嗎? – 2013-03-11 11:45:23
@ebram我想使gridview的第一列linkbutton? – Binoop 2013-03-11 12:09:41