Click here to Skip to main content
15,898,134 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Friends,

I tried to delete a directory using the following code

C#
Directory.Delete("Directory name",true);


Its working fine. I try to redirect the same page with session message.
But the session was cleared and its automatically redirect to login page.
Could anyone help to redirect the same page with session message.



Thanks
Posted

1 solution

Hi,

Session can not clear with this code.
You should check your session timeout setting in config file. And debug you code to check where the session is expiring.

Most probable reason : Session is expiring into the redirected page, Put break point in page load of redirected page and check the code.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900