Can I reuse a bookmarked url [GET Method ;Framework ASP.Net Db Oracle] after logging off??
+1
A:
Yes. When the user tries to reuse the bookmarked URL, they are redirected to the login page. Before you redirect the user, you should capture the requested URL and store it in the request as a encoded string. After the user successfully logs in, you they redirect to the stored URL.
To store the url:
if (Session == null)
Response.Redirect(String.Format("~/Default.aspx?RequestedUrl={0}", Server.UrlEncode(Request.Url.PathAndQuery)), true);
To then perform redirect after the login:
if(Request.Params["RequestedUrl"] != null)
Response.Redirect(Server.UrlDecode(Request.Params["RequestedUrl"]));
Chris
2010-01-14 15:44:18