Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27554

Please HELP fill and SUBMIT a WebForm from Vb.NET (Fill ok, but submit is not working

$
0
0
I 'm developing a vb.net application. I have a webbrowser, and i need to fill some info on a webform and click submit button. All is ok except the submit, nothing happens !!! Please help !

The html page :

Code:

<p>
        <input id="submit" name="submit" type="submit" value="Publicar" />

 </p>

My Code :

Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
If PAgina = 0 Then
Dim document As HtmlDocument = WebBrowser1.Document
Dim inputValue As HtmlElement = document.GetElementById("title")
inputValue.SetAttribute("value", "sdf fdd fh fgh fgh fg hfg hf ghfgh fg fg f hf fgh ")

inputValue = document.GetElementById("zone")
inputValue.SetAttribute("value", "Logroño")

inputValue = document.GetElementById("editor")
inputValue.SetAttribute("value", "Logroño s dfs dfs fsdfsd fsddfg dfg df gdf gdf gd df sd sd fsd fsdfsdfsdsdfsdf sdsdf")


inputValue = document.GetElementById("email")
inputValue.SetAttribute("value", "dfgdgrankkk@gmail.com")


WebBrowser1.AllowNavigation = True

**Dim submitButton As HtmlElement = document.GetElementById("submit")
submitButton.InvokeMember("submit")
' WebBrowser1.Document.Forms("post").InvokeMember("submit")**
PAgina = 1
End If
end sub

Viewing all articles
Browse latest Browse all 27554

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>