This topic has been archived. It cannot be replied.
-
工作学习 / 专业技术讨论 / How to refresh a veriable in asp? ThanksI need a asp page: when first time load it that should be a form . After "Submit", it should show the form with empty content and search result on the same window.
My problem is that whenever reload it, it always shows the form with empty content and last time result.
Anyone can help me? Thanks.
-xxu999(杰姆);
2005-12-4
{304}
(#2643280@0)
-
ASP的页面用户reload你一点办法没有,一般没什么必要去处理,Microsoft自己网站reload都是这样的,非要不允许用户事后reload的话,在html里加上cache时间为0,每次search results里加上时间,load时如果和当前时间相差大于10秒的就不load
-dzhu(加工资);
2005-12-4
(#2643967@0)
-
Thanks. Could you give a sample, please ?
-xxu999(杰姆);
2005-12-6
(#2646288@0)
-
另一个办法:参考rolia 老大的发贴页面。第一次load 时生成一个随机数存到数据库并作为hidden变量写到页面,提交查询时比较该值,一致的话输出结果,清掉数据库的值;不一致则只显示form.如果把form method 改成get, 就不会有确认post的窗口,不过就是一堆参数在url里烦人。
-holdon(again);
2005-12-6
{216}
(#2646351@0)