I am trying to read the XML files of a website, I am using HtmlAgilityPack. This is the code I am using:
HtmlWeb web = new HtmlWeb( ) ;
HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument( ) ;
doc = web.Load( "http://example.com/index.asp" ) ;
The page asks for a password which they have provided me with but I'm not sure how to pass the password in order to get to the index.asp page where I will read the XML links of the page.
The example.com/index.asp looks like this:
<form action="index.asp" method="post">
<table>
<tbody>
<tr>
<td>
<input type="Text" name="password" value="" size="20">
</td>
</tr>
</tbody>
</table>
</form
How do I pass the password to this page from HtmlAgilityPack? I saw an example here that uses 'HtmlWeb.PreRequest' but I don't really understand too much about the process. I see that HtmlWeb.Load has 7 overloads but I don't know where to put my variable that holds the password.
doc = web.Load( "http://example.com/index.asp", "passwordVariable" ) ;
If someone could direct me to the right path to research I would really appreciate it.
Thank you