开发者

In C# .NET 2.0, is there any way to get access to the URL history of a WebBrowser control?

Well, the title is pretty much the whole question. I'd like to be able to clear the WebBrowser controls history on every Navigate - to prevent my users from going back to a previous page. i already disabled the right click menu so they don't have access to the "Back" option, but they could still hit Backspace to go back in history. blocking the backspace key pres would cause problems when a user is legitimately using it to delete characters in web forms and such, so i figure just clearing out the history each time i navigate would completely solve the problem

EDIT: alternatively, if there is a way to detect if the Backspace key is currently pressed, i can add a check inside my handler on Navigating and cancel the event if the key is down. Too 开发者_如何学Gobad .NET 2.0 doesn't have the Keyboard class :(


It might be easier and more robust to use the Navigating event to cancel a page navigation you don't want to allow.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜