想要将记录从另一个页面添加到数据网格 [英] Want to add records to the datagrid from another page

查看:72
本文介绍了想要将记录从另一个页面添加到数据网格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
我创建了具有AddToCart.aspx和ProductForCategoris.aspx的Asp.NET应用程序.
AddToCart.aspx页包含以下控件:
1.产品名称:(标签)
2.产品价格:(标签)
3.产品描述:(标签)
4.产品数量:(文字框)
5.产品名称:(标签)
6.加入购物车:(按钮)
单击按钮后,必须将页面重定向到具有DataGrid Control的ProductForCategoris.aspx.DataGrid控件包含从AddToCart.aspx中选择的产品.
如果用户希望从AddToCart.aspx页上获取更多项目,则必须在单击时添加它.

请帮助我...谢谢.

Hello,
I have created Asp.NET application which has AddToCart.aspx and ProductForCategoris.aspx.
AddToCart.aspx page contains following controls:
1.Product Name :(Label)
2.Product Price :(Label)
3.Product Description :(Label)
4.Product Quantity:(TextBox)
5.Product Name :(Label)
6.Add to cart :(Button)
When after clicking the Button ,the page must be redirected to ProductForCategoris.aspx which has DataGrid Control.DataGrid control contains the selected product from AddToCart.aspx
When user wants more items from AddToCart.aspx page it must be added as on clicking.

Please help me ...Thnks.

推荐答案

您好

在您的代码后面创建一个临时表,并将其放在viewstate或cache上,并访问该表以绑定您的数据网格.

希望这会有所帮助.
Hi

Create a temporary table in your code behind and place it on either viewstate or cache and access the same to bind your datagrid.

Hope this helps.


这篇关于想要将记录从另一个页面添加到数据网格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆