Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

Filling a form in an external webpage

$
0
0

Hi all,

I was having a windows application project where I was using webbrowser control to load an external webpage and simulate user to fill in a form in this external webpage. Now I want to do the same thing using asp.net but as you know there is no webbroser control in there. I have loaded the external webpage using AgilityPack but I couldn't edit the textbox in the external webpage. Here is the code that I am using:

String Url2dehands = "http://www.hereisthewebsite.be";
    HtmlWeb mvWeb = new HtmlWeb();
    HtmlDocument doc = mvWeb.Load(Url2dehands);
    HtmlNode mvTextBox = doc.DocumentNode.SelectSingleNode("//input[@id='id_ofthe_textbox']");
    mvTextBox.InnerHtml= "assdsda";

This won't change the textbox text. I tried other options as well but no joy. Could you please tell me how I can do it?

Many thanks.


Viewing all articles
Browse latest Browse all 23244

Trending Articles



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