Why is WebBrowser_DocumentCompleted() firing twice?

前端 未结 9 1326
独厮守ぢ
独厮守ぢ 2020-11-29 08:35

Well, I\'m using a simple webbrowser control to browse to a page, so I need to change the Text of the form while doing so. I\'m using -

private void webBrow         


        
9条回答
  •  醉梦人生
    2020-11-29 09:16

    Might be you are subscribing this event multiple times like in your some method when your navigating to URL everytime you subscribe to this event.

    To solve this problem, move that line out of the method and put it somewhere else where it will only be called once per instance. In the constructor of the class perhaps... That should solve your problem .

提交回复
热议问题