StealthRT

I cant seem to get the following code to work in VB 2005 (im new at VB.net) for windows mobile 5 Pocket PC CF 2.0:

Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted

WebBrowser1.Document.GetElementById("nameInput").InnerText = "xxxxxx"

End Sub

There is a textbox on the webpage named "nameInput" and i was just testing to see if it would put "xxxxxx" inside it after i hit the button to submit it (code not shown for that but is needed as well).

I keep getting this error for the WebBrowser1.Document line:

Error 1 'Document' is not a member of 'System.Windows.Forms.WebBrowser'

How can i correct this for what i need to do Any help would be great as i am stuck with this one right now!

Thanks! :)

David



Re: Smart Devices VB and C# Projects Sending value to a webpage textbox via WebBrowser1 control

Ilya Tumanov

NETCF¡¯s WB control has no Document property so you can¡¯t do that ¨C it won¡¯t even compile. You'd need to find another way to accomplish whatever it is you're doing.






Re: Smart Devices VB and C# Projects Sending value to a webpage textbox via WebBrowser1 control

StealthRT

Is there any way to take values that i enter on the VB form textbox and send them to the textbox on the webpage that i make I use mySQL for my database and of course theres no good solution for mySQL on the pocket pc so i had to find other ways to do it and i figured that making a few buttons to at values to the textbox on the form and then send them over to the correct textboxes on the web page and submitting it would work just as well.

David





Re: Smart Devices VB and C# Projects Sending value to a webpage textbox via WebBrowser1 control

Ilya Tumanov

If you final task is to connect to MySQL, using web page in WB control is probably the worst possible way to do it.

Just use Web Service as a proxy for MySQL connection or purchase 3rd party ADO.Net data provider so you can connect from NETCF to MySQL directly.






Re: Smart Devices VB and C# Projects Sending value to a webpage textbox via WebBrowser1 control

StealthRT

Ilya Tumanov:

Thank you for replying. Do u happen to have any examples of Web Service as a proxy for MySQL

Thanks!

David





Re: Smart Devices VB and C# Projects Sending value to a webpage textbox via WebBrowser1 control

Zero Dai - MSFT

Dear StealthRT,

"Web Service as a proxy for MySql": We access the database(MySql) through web service, then our mobile device get data through accessing this web service.

Here is the link that teaches us how to create a webservice that can be accessed by mobile device and highlight the spot we need to notice.

http://blogs.msdn.com/mohitgog/archive/2006/04/20/579641.aspx

Regards,

Zero Dai - MSFT