如何自动刷新GridView [英] how to autorefresh gridview

查看:301
本文介绍了如何自动刷新GridView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个asp.net页面,一个是 customerEntry.aspx ,客户端从中输入值,第二个页面 customerEntryView.aspx 在gridview中..

当我在表单中输入新条目时,应该在gridview中更新数据,如何使gridview自动刷新..?

我的问题是-仅当刷新页面时,GridView数据才会被刷新,否则不会被刷新.

现在,每当刷新页面时创建新条目时,我都希望自动刷新网格.

I have a two asp.net pages, one is customerEntry.aspx, from which client enters the value and second one customerEntryView.aspx, in which data is displayed in gridview..

When I make the new entry in the form, the data should be updated in gridview how to make the gridview autorefresh..?

My problem is - only when I refresh the page, then gridview data gets refreshed, oherwise not.

Now I want to autorefresh the grid, whenever new entry made withuot refreshing the page.

推荐答案

请检查以下链接以了解您的要求.
1. 如何自动刷新ASP.NET GridView [^ ]
2. 在ASP.Net页中自动刷新数据 [ ^ ]
Please check the below links for your requirements.
1. How to refresh an ASP.NET GridView automatically[^]
2. Auto refresh data in ASP.Net page[^]


您是否通过任何重定向连接CustomerEntry.aspxCustomerEntryView.aspx?我的意思是说您如何在两个页面之间导航?
如果客户端正在向CustomerEntry.aspx输入一些数据,请在Save/Submit按钮上单击重定向到CustomerEntryView.aspx.在页面的Page_Load事件中,加载网格.
Are you connecting CustomerEntry.aspx and CustomerEntryView.aspx through any redirections? I mean to say how do you navigate between both the pages?
If client is entering some data into CustomerEntry.aspx, on Save/Submit button click redirect to CustomerEntryView.aspx. On Page_Load event of the page load the grid.


在数据库中输入或更新后,
放置代码以刷新网格.
after you make entry or update in the database,
place your code to refresh the grid.
gridview1.DataBind();


这篇关于如何自动刷新GridView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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