How to Delete History in ASP.NET

Written by michael scarn
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to Delete History in ASP.NET
A simple tool can be created in ASP.net that will automatically delete the Web history of any Internet browser. (computer image by blaine stiger from Fotolia.com)
<p>ASP.net is a type of programming language created by Microsoft to allow computer programmers to build complex websites and Web applications. ASP.net is compatible with any programming language that is supported by the .NET language. One frustration programmers often encounter is trying to delete the history of an Internet browser, such as Microsoft Internet Explorer. This frustration arises because of the structure of the ASP.net language. Although there are multiple ways to delete browser history, the preferred method is to create a simple tool with some programming code that will automatically delete browsing history each time the Internet browser is closed.

Skill level:
Moderate

Other People Are Reading

Things you need

Show MoreHide

Instructions

  1. 1

    Open your chosen ASP.net language program and set the program up to create a new script.

  2. 2

    Begin the new script by entering in the following computer language code:

    protected void logout()

    {

    This code tells the computer to initiate this code anytime the Web browser is closed.

  3. 3

    Create the following code immediately under the code listed in Step 2:

    session.abandon();

    string nextpage="logout.aspx";

    response.write (<script language=javascript>);

  4. 4

    Type directly under the code provided in Step 3 the following language:

    response.write (var backlen= history.length;);

    response.write (window.location.href=' +nextpage+ ';);

  5. 5

    Enter the code below to conclude the programming of your automatic history-clearing program:

    response.write (</script>)

    }

Don't Miss

Filter:
  • All types
  • Articles
  • Slideshows
  • Videos
Sort:
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the eHow.co.uk site, you consent to the use of cookies. For more information, please see our Cookie policy.