How to Delete History in ASP.NET

How to Delete History in ASP.NET thumbnail
A simple tool can be created in ASP.net that will automatically delete the Web history of any Internet browser.

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.

Things You'll Need

  • ASP.net language program
Show More

Instructions

    • 1

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

    • 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

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

      session.abandon();

      string nextpage="logout.aspx";

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

    • 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

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

      response.write (</script>)

      }

Related Searches:

References

  • Photo Credit computer image by blaine stiger from Fotolia.com

Comments

You May Also Like

Related Ads

Featured