每当数据库更新c#时更新页面

每当数据库更新c#时更新页面

本文介绍了每当数据库更新c#时更新页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

伙计我有2页page1.aspx和page2.aspx。在第1页,我将数据库和打印记录连接到page.In page2我有一个表单,我可以将新记录添加到数据库。顺便说一句,我当我按下第1页上的添加记录按钮时,在页面1内部(在特定div内)加载page2。我的问题是,当新记录添加到数据库时,我想立即更新我的页面(显示记录)。我不允许用SQLCache或SqlDependency做这个。有没有其他方法来实现这个?请告诉我一个方式我几个小时就遇到了这个问题。

Guys I have 2 pages page1.aspx and page2.aspx .In page1, I'm connecting database and printing records to page.In page2 I have a form which I can add new record to database.By the way,I'm loading page2 inside the page1(inside a specific div) when I pressed 'Add record' button on page1. My problem is,when new record added to the database,I want to update my page(showing record) immediately.And I'm not allowed to do this with SQLCache or SqlDependency.Is there another way to accomplish this?Please show me a way I'm stucked with this problem a couple of hours.

推荐答案




这篇关于每当数据库更新c#时更新页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-23 01:31