|
|
| try this |
ram kumar provided a rated reply to Saurabh ...... on Saturday, September 06, 2008 12:46 PM |
|
Hi,
protected void LogOut() { Session.Abandon(); string nextpage = "Logoutt.aspx"; Response.Write("<script language=javascript>");
Response.Write("{"); Response.Write(" var Backlen=history.length;");
Response.Write(" history.go(-Backlen);"); Response.Write(" window.location.href='" + nextpage + "'; ");
Response.Write("}"); Response.Write("</script>");
}
|
| Reply Reply Using Power Editor |
| |
| |
Rank |
Winnings |
Points |
| November |
0 |
$0.00 |
0 |
| October |
0 |
$0.00 |
0 |
|
|
|
|
|
|
| U cannot do that with javascript |
Binny ch provided a rated reply to Saurabh ...... on Saturday, September 06, 2008 1:16 PM |
|
You cannot clear the existing history but you can make sure a newly selected page replaces the previous one preventing building up a history. You do so by calling location.replace('newPage.htm'); instead of assigning location.href = 'newPage.htm'; The location.replace('url') call will replace the current page in the history list with the new page thus preventing backing to the current page. You might also use that in a link with <A HREF="newPage.html" ONCLICK="location.replace(this.href); return false;" >new page</A>
|
| Reply Reply Using Power Editor |
| |
| |
Rank |
Winnings |
Points |
| November |
0 |
$0.00 |
0 |
| October |
0 |
$0.00 |
0 |
|
|
|
|
|
|
|
|
| Deleting history of browser? Please don't do this. |
Eriawan Kusumawardhono provided a rated reply to Saurabh ...... on Sunday, September 07, 2008 11:49 AM |
|
Hi,
Although IE has the ability to delete the browser's history, I advice you not to do this!
Browser history is not just your web page history, it also can contain other web page history, not just yours. If your web page is opened side by side with other web pages from other sites especially ecommerce or portal sites, you'll upset your user if you clear the browser history! After history cleared, the browser has no ability to do its client page state management that goes with the history.
If you don't want to deal with browser history, you can simply make the web page's of your web application session to be expired for a very short time.
Eriawan
|
| Reply Reply Using Power Editor |
| An ordinary software developer that mingles with .NET 2.0, WPF, WCF, WF and currently making his way thru .NET 3.5.
Very addicted to the latest happening on Microsoft software development tool such as Visual Studio. |
| |
Rank |
Winnings |
Points |
| November |
0 |
$0.00 |
0 |
| October |
0 |
$0.00 |
0 |
|
|
|
|
|
|
| try this. |
Vasanthakumar D provided a rated reply to Saurabh ...... on Monday, September 08, 2008 12:33 AM |
|
Hi,
try the belwo one..
Page.ClientScript.RegisterStartupScript(this.GetType(),"cle","windows.history.clear",true);
|
| Reply Reply Using Power Editor |
| |
| |
Rank |
Winnings |
Points |
| November |
0 |
$0.00 |
0 |
| October |
6 |
$42.00 |
145 |
|
|
|
|
|
|
|