如何在另一个页面中使用gridview值

问题描述:


我在一个页面中使用了gridview,并试图在另一页面中访问该详细信息..因为我在其他页面中有立即订购"按钮,要求用户选择经销商名称,因此当用户单击订单"时,该按钮会同时显示网格数据和经销商名称应该转到数据库..

Hi,
i used gridview in one page and trying to access that details in another page..because i have order now button in some other page where user is requested for selecting dealer name so when user clicks on order now button that grid data along with dealer name should go to the database..

请参考链接,您将从这些链接中获得一些帮助:
在(c#窗口应用程序) [如何将gridview行值发送到其他页面 [ ^ ]
Please refer the links, you will get some help from them:
access data grid view in other page in (c# window application)[^]
how to send gridview row values to other page[^]


请参阅此
http://forums.asp. net/t/1791833.aspx/1?需要+ to + pass + single + gridview + value + to + another + page [ http: //stackstackflow.com/questions/9193063/how-to-send-multiple-gridview-rows-to-another-page-and-populate-those-rows-in-th [
see this
http://forums.asp.net/t/1791833.aspx/1?Need+to+pass+single+gridview+value+to+another+page[^]

http://*.com/questions/9193063/how-to-send-multiple-gridview-rows-to-another-page-and-populate-those-rows-in-th[^]


Here is my code... i have taken a page called image.aspx in that the following is the source code (which consists of a griview with hyperlink)

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="image.aspx.cs" Inherits="image" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
    <title>Untitled Page</title>
    </head>
    <body>
    <form id="form1" runat="server">
    <div>
    <asp:FileUpload ID="FileUpload1" runat="server" />
    <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BackColor="White"

    BorderColor="White" BorderStyle="Ridge" BorderWidth="2px" CellPadding="3" CellSpacing="1"

    DataKeyNames="QuickLook ID" DataSourceID="SqlDataSource1" GridLines="None">
    <FooterStyle BackColor="#C6C3C6" ForeColor="Black" />
    <Columns>
    <asp:BoundField DataField="Full Name" HeaderText="Full Name" SortExpression="Full Name" />
    <asp:BoundField DataField="Name Displayed" HeaderText="Name Displayed" SortExpression="Name Displayed" />
    <asp:BoundField DataField="Birth Day" HeaderText="Birth Day" SortExpression="Birth Day" />
    <asp:BoundField DataField="Access Level" HeaderText="Access Level" SortExpression="Access Level" />
    <asp:BoundField DataField="Team Name" HeaderText="Team Name" SortExpression="Team Name" />
    <asp:BoundField DataField="Joining Date" HeaderText="Joining Date" SortExpression="Joining Date" />
    <asp:HyperLinkField DataNavigateUrlFields="Quicklook Id" DataNavigateUrlFormatString="nextpage.aspx?id={0}"

    DataTextField="QuickLook ID" />
    </Columns>
    <RowStyle BackColor="#DEDFDE" ForeColor="Black" />
    <SelectedRowStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" />
    <PagerStyle BackColor="#C6C3C6" ForeColor="Black" HorizontalAlign="Right" />
    <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#E7E7FF" />
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%