VB6 to VB.NET ?

nkrulez
nkrulez used Ask the Experts™
on
somebody plz convert this to VB.NET

WebBrowser1.Navigate ("http://domain/mailer.php" + "?to=" + txtto + "&subject=" + txtsubject + "&from=" + txtfrom + "&message=" + txtmsg)

and is there any tool out there that converts VB6 Projects to VB.NET and the other way around ?

thanks a bunch.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Éric MoreauSenior .Net Consultant
Top Expert 2016

Commented:
which version of VB.Net? Starting with VB.Net 2005, you also have a WebBrowser control. Have a look at http://www.emoreau.com/Entries/Articles/2007/04/The-WebBrowser-control.aspx

Author

Commented:
VB.NET 2008

Author

Commented:
and i obviously want to convert the expression [ + "?to=" + txtto + "&subject....etc ] because it is not the same for .NET
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Senior .Net Consultant
Top Expert 2016
Commented:
the syntax is almost the same. the Navigate method still exist. The only thing is that default properties (in your case the Text property of the Textbox object) is not supported anymore.

it should now be:
WebBrowser1.Navigate ("http://domain/mailer.php" + "?to=" + txtto.Text + "&subject=" + txtsubject.Text + "&from=" + txtfrom.Text + "&message=" + txtmsg.Text)
Mike TomlinsonHigh School Computer Science, Computer Applications, Digital Design, and Mathematics Teacher
Top Expert 2009

Commented:
It should work in VB.Net too...

If you want to be more "correct" then use & instead of +.

    WebBrowser1.Navigate ("http://domain/mailer.php" & "?to=" & txtto & "&subject=" & txtsubject & "&from=" & txtfrom & "&message=" & txtmsg)

Otherwise, what error messages are you getting?
Mike TomlinsonHigh School Computer Science, Computer Applications, Digital Design, and Mathematics Teacher
Top Expert 2009

Commented:
Good catch emoreau...wasn't clear if they were controls or variables.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial