Sub nocache_store()
'HttpContext.Current.Session.LCID = 2057
With HttpContext.Current
'.Session.LCID = 2057
.Response.AppendHeader("Pragma", "no-cache")
.Response.AppendHeader("Cache-Control", "no-cache")
.Response.AppendHeader("Cache-Control", "no-store")
.Response.AppendHeader("Cache-Control", "must-revalidate")
.Response.CacheControl = "no-cache"
.Response.Expires = -1
.Response.Cache.SetCacheability(HttpCacheability.ServerAndNoCache)
.Response.Cache.SetAllowResponseInBrowserHistory(False)
.Response.ExpiresAbsolute = New DateTime(1900, 1, 1)
End With
End Sub
click here to Convert Code from vb.net to c#.net
No comments:
Post a Comment