处理背等 [英] Handling Backs etc.

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

问题描述

H


我想知道是否有人知道推荐的方式来处理后退点击,以及刷新用户对高级ASP.NET网站的点击次数

我有一个网站,其中包含一组可以在一个页面上编辑的信息,但是当采取某种行动时,用户必须无法返回并更改细节等等!

基本上,这是一个高级的Timesheet应用程序......当有人输入几个小时并点击提交时,他们可以查看时间表,但无法添加或编辑项目。我已经有效地阻止了所有Back请求,但这使得该网站非常不友好!我希望网站评估某些内容,并允许用户点击返回,并重定向到另一个页面或更改页面状态(例如,如果该人员之前处于编辑模式,则从编辑中查看)

我不介意如果网站没有快速使用Back请求,我知道如果我想要评估事情,页面需要回到srever。

我肯定必须有一个接受的推荐程序处理这个,但我还没找到它!


任何人都可以帮助我

按照目前的情况,我在每个页面的表格中都包含以下代码,它阻止了后面的罚款,但并不是最佳的!


<

Response.ExpiresAbsolute =现在(

Response.Expires =

Response.CacheControl =" no-cache

Response.Buffer = Tru

Response.Cache.SetCacheability(HttpCacheability.No Cache

Response.Cache.SetExpires(DateTim) e.UtcNow

Response.Cache.SetNoStore(

Response.Cache.SetRevalidation(HttpCacheRevalidati on.AllCaches




任何建议都将不胜感激!


感谢advanc

David Crone

解决方案

我会把一些东西放在一个cookie或会话中说它

就在那里,如果存在,在页面显示之前重定向....


James Hancock


" David Crone" <哒********* @ currieb.ie>在消息中写道

news:24 ********************************** @ microsof t.com ...



我想知道是否有人知道推荐的方式是处理Back
点击,以及刷新用户的点击次数对于高级ASP.NET站点?
我有一个网站,其中包含一组可以在一页上编辑的信息,但是当采取某种行动时,用户必须无法返回并更改详细信息等!!
基本上,这是一个高级的时间表应用程序......当有人进入
几个小时并点击提交时,他们就可以查看时间表,<但是无法添加或编辑项目。我已经有效地阻止了所有Back请求,
但这使得该网站非常不友好!我希望网站评估某些内容,并允许用户点击返回,并将
重定向到另一个页面或更改页面状态(如果是,则从编辑中查看)例如,之前的人处于编辑模式。)
我不介意该网站是否因为Back请求而没有快速闪电,因为我知道页面需要返回到如果我想要评估一些东西,那就更好了。
我肯定必须有一个接受推荐的程序来处理
这个,但是我还没找到它! />
任何人都可以帮助我吗?
按照目前的情况,我在每个页面的表格中都包含以下代码,
它阻止了后面的罚款,但并不是最佳的!响应.ExpiresAbsolute = Now()
Response.Expires = 0
Response.CacheControl =" no-cache"
Response.Buffer = True
Response.Cache.SetCacheability(HttpCacheability.No Cache)
Response.Cache.SetExpires(DateTi me.UtcNow)
Response.Cache.SetNoStore()
Response.Cache.SetRevalidation(HttpCacheRevalidati on.AllCaches)
%>

任何建议都会很大赞赏!!

提前致谢
David Crone





嗨詹姆斯


唯一的问题是,如果你只是点击返回,用户不会将

带回服务器!!

另外,跟踪用户是否曾经在那里或不可靠,

,好像用户正确浏览该页面,我们不希望他们

被阻止!


我有一个页面有许多不同的状态(添加,编辑,

SubmittingForApproval等)。

一旦用户拥有例如,批准他的时间表,我们不希望他

能够编辑其中的详细信息,但我们希望他能够点击

返回点击批准后,能够在View

模式下查看页面,而不是在编辑模式中,就像以前一样。但是点击Back只需

显示以前的HTML缓存!!


你是按照我的意思吗?


提前致谢

David Crone

***通过Developersdex发送 http://www.developersdex.com ***

不要只是参加USENET ......获得奖励!



嗨大卫,


您是否有机会查看我上次回复中的建议或

你对这个问题有什么进一步的想法吗?如果您有任何不清楚的地方或者我们可以提供其他任何帮助,请随时在此处发布。谢谢。


问候,


Steven Cheng

微软在线支持


安全! www.microsoft.com/security

(此帖子按原样提供,不作任何保证,并且不授予

权利。)


在ASP.NET上获取预览whidbey
< a rel =nofollowhref =http://msdn.microsoft.com/asp.net/whidbey/default.aspxtarget =_ blank> http://msdn.microsoft.com/asp.net/whidbey /default.aspx


H

I was wondering if anyone knew what the recommended way is to handle Back clicks, as well as Refresh clicks by users for advanced ASP.NET sites
I have a site that has a set of information that can be edited on one page, but when a certain action is taken, the user mustn''t be able to go back and change details etc!
Basically, this is an advanced Timesheet application...when someone enters some hours and clicks Submit, then they are allowed to View the timesheet, but cant Add or Edit items. I''ve effectively blocked all Back requests, but this makes the site very un-user friendly!! I want the site to evaluate certain things, and allow the user to click back, and to redirect to another page or change the State of the page (to View Only from Edit if the person was on Edit mode previously for example)
I don''t mind if the site isn''t lightening-quick with the Back requests, as I understand that the page needs to go back to the srever if I want things to be evaluated.
I''m sure there must be an Accepted Recommended procedure with handling this, but I haven''t found it!

Can anyone help me
As it stands, I have the following code included in the Form of each page, and it Blocks the back fine, but isn''t optimal!

<
Response.ExpiresAbsolute = Now(
Response.Expires =
Response.CacheControl = "no-cache
Response.Buffer = Tru
Response.Cache.SetCacheability(HttpCacheability.No Cache
Response.Cache.SetExpires (DateTime.UtcNow
Response.Cache.SetNoStore(
Response.Cache.SetRevalidation(HttpCacheRevalidati on.AllCaches
%

Any advice will be greatly appreciated!

Thanks in advanc
David Crone

解决方案

I would just put something in either a cookie or the session saying that it
was there, and if that exists, redirect before the page is displayed....

James Hancock

"David Crone" <da*********@currieb.ie> wrote in message
news:24**********************************@microsof t.com...

Hi

I was wondering if anyone knew what the recommended way is to handle Back
clicks, as well as Refresh clicks by users for advanced ASP.NET sites?
I have a site that has a set of information that can be edited on one
page, but when a certain action is taken, the user mustn''t be able to go
back and change details etc!!
Basically, this is an advanced Timesheet application...when someone enters
some hours and clicks Submit, then they are allowed to View the timesheet,
but cant Add or Edit items. I''ve effectively blocked all Back requests,
but this makes the site very un-user friendly!! I want the site to
evaluate certain things, and allow the user to click back, and to redirect
to another page or change the State of the page (to View Only from Edit if
the person was on Edit mode previously for example).
I don''t mind if the site isn''t lightening-quick with the Back requests, as
I understand that the page needs to go back to the srever if I want things
to be evaluated.
I''m sure there must be an Accepted Recommended procedure with handling
this, but I haven''t found it!!

Can anyone help me?
As it stands, I have the following code included in the Form of each page,
and it Blocks the back fine, but isn''t optimal!!

<%
Response.ExpiresAbsolute = Now()
Response.Expires = 0
Response.CacheControl = "no-cache"
Response.Buffer = True
Response.Cache.SetCacheability(HttpCacheability.No Cache)
Response.Cache.SetExpires (DateTime.UtcNow)
Response.Cache.SetNoStore()
Response.Cache.SetRevalidation(HttpCacheRevalidati on.AllCaches)
%>
Any advice will be greatly appreciated!!

Thanks in advance
David Crone




Hi James

The only problem is that if you just click Back, the user doesnt get
taken back to the server!!
Also, tracking if the user has Been there before or not isnt reliable,
as if the user browses back to that page properly, we dont want them to
be blocked!!

I have a page that has many different States (Adding, Editing,
SubmittingForApproval etc).
Once the user has Approved his timesheet for example, we dont want him
to be able to edit details in it, but we want him to be able to click
Back after clicking Approve, and to be able to see the page in View
mode, and not in Edit mode as he was before. But clicking Back just
shows the Previous HTML cached!!

Do you follow what I mean?

Thanks in advance
David Crone
*** Sent via Developersdex http://www.developersdex.com ***
Don''t just participate in USENET...get rewarded for it!



Hi David,

Have you had a chance to check out the suggestions in my last reply or have
you got any further ideas on this issue? If you have anything unclear or if
there''re anything else we can help, please feel free to post here. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx


这篇关于处理背等的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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