Click here to Skip to main content
15,917,005 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Scroll panel automatically to the node selected in a treeview. Pin
VishwaKL9-Apr-13 22:21
VishwaKL9-Apr-13 22:21 
QuestionIssues with show popup when paging in mvc Pin
tuannguyenf49-Apr-13 8:14
tuannguyenf49-Apr-13 8:14 
Questionhow to decrypt password? Pin
Jassim Rahma9-Apr-13 4:11
Jassim Rahma9-Apr-13 4:11 
AnswerRe: how to decrypt password? Pin
Richard Deeming9-Apr-13 4:27
mveRichard Deeming9-Apr-13 4:27 
GeneralRe: how to decrypt password? Pin
R. Giskard Reventlov9-Apr-13 8:51
R. Giskard Reventlov9-Apr-13 8:51 
GeneralRe: how to decrypt password? Pin
Jassim Rahma11-Apr-13 0:02
Jassim Rahma11-Apr-13 0:02 
Questionmvc3 razor Pin
pooja_verma9-Apr-13 2:07
pooja_verma9-Apr-13 2:07 
AnswerRe: mvc3 razor Pin
Necmettin Demir13-Apr-13 3:41
Necmettin Demir13-Apr-13 3:41 
QuestionHow to ReturnURL? Pin
Jassim Rahma9-Apr-13 1:53
Jassim Rahma9-Apr-13 1:53 
AnswerRe: How to ReturnURL? Pin
AmitGajjar10-Apr-13 1:15
professionalAmitGajjar10-Apr-13 1:15 
GeneralRe: How to ReturnURL? Pin
Jassim Rahma10-Apr-13 3:06
Jassim Rahma10-Apr-13 3:06 
GeneralRe: How to ReturnURL? Pin
AmitGajjar10-Apr-13 3:10
professionalAmitGajjar10-Apr-13 3:10 
QuestionQuestion of the day post on a web page Pin
Member 87742808-Apr-13 20:25
Member 87742808-Apr-13 20:25 
QuestionDoes Response.Redirect("~/MyPage.aspx", true); clear session on redirect? Pin
Steve Holdorf8-Apr-13 12:04
Steve Holdorf8-Apr-13 12:04 
AnswerRe: Does Response.Redirect("~/MyPage.aspx", true); clear session on redirect? Pin
jkirkerx8-Apr-13 12:38
professionaljkirkerx8-Apr-13 12:38 
GeneralRe: Does Response.Redirect("~/MyPage.aspx", true); clear session on redirect? Pin
Jasmine25018-Apr-13 12:56
Jasmine25018-Apr-13 12:56 
The second argument terminates the current response. It's a good idea to set that to true usually.

You are correct, and in my experience this holds true - nothing in the Response.Redirect behavior affects session values.

Possibly he's storing sessions without cookies, and he's losing the query string value which is used in that case to keep the session alive.

Keep in mind, Response.Redirect is a CLIENT-SIDE redirect, meaning control goes back to the browser, and it requests the new page. When that request comes in, it looks like a new request, so if there's no cookie to tell the server the SessionID, it's going to be lost if you don't pass the query string value back as part of the redirect URL. I often take advantage of that to "reset" the current page by redirecting back to itself.

In other words... this might work...

C#
Response.Redirect("~\Page.aspx?" + Request.QueryString.ToString(), true);

GeneralMessage Closed Pin
8-Apr-13 13:14
professionaljkirkerx8-Apr-13 13:14 
GeneralRe: Does Response.Redirect("~/MyPage.aspx", true); clear session on redirect? Pin
Jasmine25019-Apr-13 5:55
Jasmine25019-Apr-13 5:55 
QuestionA potentially dangerous Request.Form value was detected from the client Pin
Member 98570608-Apr-13 11:18
Member 98570608-Apr-13 11:18 
AnswerRe: A potentially dangerous Request.Form value was detected from the client Pin
jkirkerx8-Apr-13 12:46
professionaljkirkerx8-Apr-13 12:46 
Questionemail is going as spam / not reaching destination Pin
Jassim Rahma8-Apr-13 3:04
Jassim Rahma8-Apr-13 3:04 
AnswerRe: email is going as spam / not reaching destination Pin
Jasmine25018-Apr-13 6:55
Jasmine25018-Apr-13 6:55 
AnswerRe: email is going as spam / not reaching destination Pin
jkirkerx8-Apr-13 8:10
professionaljkirkerx8-Apr-13 8:10 
GeneralRe: email is going as spam / not reaching destination Pin
Jasmine25018-Apr-13 11:07
Jasmine25018-Apr-13 11:07 
GeneralRe: email is going as spam / not reaching destination Pin
jkirkerx8-Apr-13 12:32
professionaljkirkerx8-Apr-13 12:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.