开发者

HttpContext.Current.Session.IsNewSession still true after redirect

I am trying to redirect to the same page with different query string parameters

HttpResponse resp = HttpContext.Current.Response;
开发者_开发技巧
resp.Redirect(landingPagePath)

To avoid further processing after redirection i check if

HttpContext.Current.Session.IsNewSession == false

but for some reason i found that this is not always the case after redirection

can anyone please tell why is this happening

Thanks


Why don't you use your Page.IsPostBack flag instead? It will be false when you redirect the page back on itself with the modified querystring.


If you are trying to avoid further processing (your description is vague), maybe you could pass an additional parameter to indicate that you just redirected.. and determine what to do based on the value of that parameter..

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜