我在asp.net vb中做了一個gridview。並且我想添加一個id列的鏈接,我想創建一個可以登陸到新頁面的鏈接等。http://localhost/defualt.aspx?id=(idar row from datarow)。用gridview可以嗎?代碼如下如何在gridview(asp.net)中添加鏈接?
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
DataKeyNames="EmployeeID" DataSourceID="SqlDataSource1">
<Columns>
<asp:BoundField DataField="EmployeeID" HeaderText="EmployeeID"
InsertVisible="False" ReadOnly="True" SortExpression="EmployeeID" />
<asp:BoundField DataField="LastName" HeaderText="LastName"
SortExpression="LastName" />
<asp:BoundField DataField="FirstName" HeaderText="FirstName"
SortExpression="FirstName" />
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:NwindConnectionString %>"
ProviderName="<%$ ConnectionStrings:NwindConnectionString.ProviderName %>"
SelectCommand="SELECT [EmployeeID], [LastName], [FirstName] FROM [Employees]">
</asp:SqlDataSource>