views:

97

answers:

2

Hi, I'm a noob to VB.NET and I was wondering how to make something you type into a textbox on the application type that text into a website textbox and submit whats in the textbox by pressing a button? I am using visual studio 2008.

A: 

That is a little tricky to do, but it is possible. However, without more details on the specific browser or what you are trying to copy over, you aren't going to get a lot of answers on here.

Better Suggestion: Have you considered instead of trying to control the browser via "voodoo", that you might just have your VB.NET application submit the form/request directly to the web server and cut out the middle-man (the browser)?

JohnFx
the application actually contains a web browser and i am just trying to make an external textbox because the box on the website is all the wasy at the bottom of the page and i want to make it easy to access
David
A: 

I'm assuming you're trying to POST data to a web form from some other application. Check this out; it's in C# but you can translate it to VB.NET. It uses a WebBrowser control and the SetAttribute method to set input values on the web form.

// C#
WebBrowser browser;
...
browser.Document.GetElementById("username").SetAttribute("value", "MyUsername");
...
form.InvokeMember("submit");
Travis Heseman