将信息gridview发送到另一页上的gridview [英] send info gridview to gridview on other page

查看:65
本文介绍了将信息gridview发送到另一页上的gridview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨.

推荐答案

我认为有多种方法可以做到这一点,例如

1)如果您在网格行中存储了一些唯一值(例如ID或名称),则可以将其传递到另一页
(第2页),然后从属于该ID/名称的数据源获取数据,并将其显示在网格中.

2)另一种方法是,将所有数据从grid1传递到另一页,并在第2页的网格中显示.
I think there are various ways to do this, like

1) If you have stored some unique value in grid row like ID or some name , then you can pass it to another page
(Page 2) and get the data from data source belongs to that ID/Name and show it in the grid.

2) Another way could be, pass all the data from grid1 to another page and show this in the grid on page 2.


您可以使用各种状态管理技术之一.
在这里看看:
MSDN:ASP.NET状态管理概述 [ ASP.NET中的状态管理-1 [ ASP.Net状态管理技术-2 [
You can use one of the various state managememnt techinques.
Have a look here:
MSDN: ASP.NET State Management Overview[^]
State management in ASP.NET - 1[^]
ASP.Net State Management Techniques - 2[^]

As said, querystring or Sessions can be easy options.


您可以将指定的行ID传递到下一页. 并基于该ID从数据库中获取行值...




您可以将所有字段设置为一个类的属性
并将这些类分配给一个会话变量.
并从另一个页面访问此会话...
You can pass the specified rows id to next page..
And getting the rows values from database based on that id...


or

you can set all the fields into properties of one class
and assign these class to one session variable.
And access this session from another page...


这篇关于将信息gridview发送到另一页上的gridview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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