954,514 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Back navigation in web browser not working c#

Hello everyone,

I have a web browser which is used to display html files that are stored locally. However when I try to use the webBrowser.GoBack() method to navigate back to previous files nothing happens and the webbrowser window continues to display the current file.

Does anyone know of a way I can navigate back through previously accessed files and display them in the webbrowser window by using a 'Back' button?

Thanks in advance for any help.

SubProf

SubProf
Light Poster
33 posts since Mar 2008
Reputation Points: 10
Solved Threads: 0
 

If you're only trying to emulate a click of the back button, don't use C# use Javascript. Add this code to you page:

<button onlick="window.history.go(-1)">Back</button>
nvmobius
Light Poster
39 posts since Jul 2008
Reputation Points: 11
Solved Threads: 4
 

Thanks Nvmobius - I'll give it a go.

SubProf
Light Poster
33 posts since Mar 2008
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You