Prevent from displaying of Windows Security window

前端 未结 3 1169
刺人心
刺人心 2020-12-01 17:36

I have some router config page URLs, I have to load them, set sth and save it. I\'m using webbrowser control and .Net 4.5 and C# language. But every time a page loads, windo

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-01 18:09

    I found the answer it is pretty simple.....

            Uri u = new Uri("http://your_domain");
            UriBuilder ub = new UriBuilder(u);
            ub.UserName = "username";
            ub.Password = "password";
            webBrowser1.Url = ub.Uri;
    

提交回复
热议问题