开发者

How to delete Webbrowser form data?

I'm using a

system.windows.forms.webbrowser

to login into facebook. When the next user logs in I want the login form to be totally blank and not have the name of the previous 开发者_C百科user in there. How can I do that?


The WebBrowser control stores Web pages from recently visited sites in a cache on the local hard disk. When the control navigates to a page, it saves time by displaying a cached version, if one is available, rather than downloading the page again. Use the Refresh method to force the WebBrowser control to reload the current page by downloading it, ensuring that the control displays the latest version.


You could use JavaScript to do this (Not pretty but it does it in 1-2 lines of code).

The markup below is not correct, it is an example.

    WebBrowrower1.Navigate("javascript: void Document(somegetelementbyID/Tagname('').value = '')");
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜