Ramy Mahrous
Postaholic
2,196 posts since Aug 2006
Reputation Points: 480
Solved Threads: 276
Zip your project and upload it. You can do this by clicking "Go Advanced" next to "Post Quick Reply", and in the next screen click on manage attachments.
sknake
Industrious Poster
4,954 posts since Feb 2009
Reputation Points: 1,764
Solved Threads: 735
It works I tried it :|
Please tell me what's the compilation error...
Ramy Mahrous
Postaholic
2,196 posts since Aug 2006
Reputation Points: 480
Solved Threads: 276
Yes, you can but it inside button click event handler or set it from control properties
Uri = http://microsoft.com
Believe me it works :)
Ramy Mahrous
Postaholic
2,196 posts since Aug 2006
Reputation Points: 480
Solved Threads: 276
In the project you uploaded the only thing I see for the browser is:
void WebBrowser1DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
webBrowser1.Url = new Uri("http://microsoft.com");
}
That is in the document complete event but I don't see anywhere that initially tell the navigator to browse. You should not be changing the browser's URL in the complete event because when it finishes loading a page it will call that event, triggering another page load, and it will loop.
I made these changes and it works:
void BrowseFaultyAPClk(object sender, EventArgs e)
{
webBrowser1.Navigate(@"http://www.google.com");
/*
string FaultyAPAddr = "http://" + FaultyAPIPOct1Num.Value + "."
+ FaultyAPIPOct2Num.Value + "."
+ FaultyAPIPOct3Num.Value + "."
+ FaultyAPIPOct4Num.Value + ".";
Process ProcessIeFaultyAP = new System.Diagnostics.Process();
ProcessIeFaultyAP.StartInfo.FileName = "iexplore.exe";
ProcessIeFaultyAP.StartInfo.WorkingDirectory = @"C:\WINDOWS\ie7";
ProcessIeFaultyAP.StartInfo.Arguments = String.Format(FaultyAPAddr);
ProcessIeFaultyAP.Start();
*/
}
void WebBrowser1DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
//webBrowser1.Url = new Uri("http://microsoft.com");
}
sknake
Industrious Poster
4,954 posts since Feb 2009
Reputation Points: 1,764
Solved Threads: 735
I'm glad you got it working
Please mark this thread as solved if you have found an answer to your original question and good luck!
sknake
Industrious Poster
4,954 posts since Feb 2009
Reputation Points: 1,764
Solved Threads: 735