在Gridview中维护数据 [英] Maintain the data in Gridview

查看:55
本文介绍了在Gridview中维护数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在网格中,我想维护一些事件之间的数据,以后再将其插入数据库中.

该网格具有插入,更新和删除记录的功能.

网格中的记录数也很大.

请提出我将遵循的最佳做法(查看状态/会话状态).

谢谢

解决方案

如果您停留在同一页面上,则可以使用ViewState.如果要在多个页面上维护未提交数据的状态,则应使用SessionState.


如果数据更多,并且您需要在页面上进行Sessions维护. /blockquote>

<![CDATA[<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="EmpInfo.aspx.cs" Inherits="EmpInfo" %>


Hi,

In grid, I want to maintain a data in-between some events and later that I have to insert into the database.

This grid have the functionalities to insert,update and delete the records.

The no of records are also large in the Grid.

Please suggest which is the best practice I would follow (View State/Session State).

Thanks

解决方案

If you''re staying on the same page, then ViewState would be the way to go. If you''re looking to maintain the state of your uncommitted data across several pages you should use SessionState.


If Data is more and u need to maintain along the pages go for Sessions.


<![CDATA[<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="EmpInfo.aspx.cs" Inherits="EmpInfo" %>


这篇关于在Gridview中维护数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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