Click here to Skip to main content
15,896,453 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
XML
I had a gridview like this in my deafult.aspx page:

   <asp:TemplateField HeaderText="Price">

<ItemTemplate>
<asp:Label ID="lblPrice" runat="server" Text='<%#Eval("price")%>' />
</ItemTemplate>
</asp:TemplateField>

<asp:TemplateField HeaderText="Item Total">
<ItemTemplate>
<asp:Label ID="lblItemTotal" runat="server" Text='<%#Eval("Item_total") %>' />
</ItemTemplate>
</asp:TemplateField>

When user click the confirm button, i want this gridview to be displayed in another page in gridview form.

Please show me an example so I can understand easily. Please :)
Posted
Comments
vivektiwari97701 19-Jul-13 6:29am    
Use Session to store 'Price' and 'Total Item' and Bind it to grid view.
jaideepsinh 19-Jul-13 6:38am    
Hi Nisha,
You can do this by two method one is store data in data base from form1 and get this data from form2 and display on it.Other on is use data table property set value to this from from1 and call this value from form2.

1 solution

There are two ways for your requirement.
First when confirm button is clicked store the contents of your gridview in a dataset or datatable in session and bind the session value in next page gridview.

Second way
By using
Server.Transfer("~/Page2.aspx");

Refer this link for second way[^]

Vote up if this solved your problem
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900