WebBrowser Ctrl - populating vars in HTML
Posted on 2001-08-07
In a VB EXE project ... how do you bind or populate variables in html pages while using the WebBrowser control to display the html?
I'm aware of using client side or server side variables in ASP pages but I don't want to develop a DHTML project nor an IIS application. I want to use the WebBrowser to display local html files, but I need to be able to replace some of the text with variable information..
It seems to me that pre-processing the html document prior to sending it to the WebBrowser in overkill or a "brute force" method. That is, I could read through the html, looking for variables (eg. <!LastName> ) and replace that with the variable text before sending it to the WebBrowser control.
Actually, that's just a one-way communication anyway. I guess I'm also looking for getting info back from the html page, perhaps the text in a text box, or the value of a radio button. So how would you reference named objects in the document?... something like....
lsLastName = WebBrowser1.Document.formName.textareaName.value