有一httphandler模块,代码如下
public class abc
implements ihttphandler
public readonly property isreusable() as boolean implements ihttphandler.isreusable
get
return true
end property
'这里定义一个变量
public x as integer
public sub processrequest(byval context as httpcontext)implements ihttphandler.processrequest
x=x+1
context.current.response.write(x)
end sub
end class
现在的情况是,每刷新一次页面,变量x的值会累加,但要求的是每次访问的时候,里面的变量值要清空,请问如何修改代码达到这个目的