我如何刷新页面 [英] how can i refesh the page
本文介绍了我如何刷新页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我创建了一个页面,用于使用存储过程插入值.
如果我插入数据并单击提交按钮,那么数据将存储在数据库中,但是当我再次刷新该页面而又未转到任何其他页面时,会将相同的值插入到表中.
有人可以提供解决方案吗?
Hi All,
I created a page to insert values using store procedure.
If I inserted the data and click on the submit button then the data is stored in data base, but when I refresh the page again, without going to any other page, the same value is inserted to the table.
Anybody can give the solution?
推荐答案
看看这些文章是否有类似问题:
ASP.Net中的刷新页面问题 [提交请求后,请刷新 [
Have a look at these articles for similar issue:
Refresh Page Issue in ASP.Net[^]
Stop Refresh after Submitting your Request[^]
hi.
您必须在下面的代码块中插入代码.
hi.
you must insert your code in below block.
page_load<br />
{<br />
if (!page.ispostback)<br />
{<br />
<br />
//insert your code here........<br />
<br />
}<br />
<br />
}
单击此处以获取有关page.ispostback
的更多信息.
www.xefteri.com/articles/show.cfm?id=18
click here to get more information about page.ispostback
www.xefteri.com/articles/show.cfm?id=18
确保插入逻辑写在
下
If(!Page.IsPostBack)
条件.
Make sure the insertion logic is written under
If(!Page.IsPostBack)
Condition.
这篇关于我如何刷新页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文