Visual C# 2005 (5 stars programmer)
I am doing an example in C# 2005 (Express Edition, I am doing microsoft 5 stars programmer course).
The first star has the following example with a WebBrowser Control.
webBrowser1.Url(txtUrl.Text.Trim);
Very simple. Read a textbox an pass the address to the webbrowser control, accourding to the course it should work. But the sinxtax says that is it a propoerty. Any hlp?
Re: Visual C# 2005 (5 stars programmer)
browser1.Navigate("http://www.vbforums.com")
course was wrong :)
Re: Visual C# 2005 (5 stars programmer)
browser1.Navigate(txtUrl.Text)
Re: Visual C# 2005 (5 stars programmer)
Moved from VB.NET
You guys forgot a semicolon ";" :)
Re: Visual C# 2005 (5 stars programmer)
You can either call the Navigate method as suggested or you can use the Url property. It is a non-indexed property, however, so you don't pass it an argument but rather assign it a value:
Code:
webbrowser1.Url = txtUrl.Text.Trim();