How to read source programatically

  • Thread starter Thread starter Kevin Vogler
  • Start date Start date
K

Kevin Vogler

I need to read the value of a hidden field on a remote HTML page and then
use that value in a form submit on my local page.

How can I read the hidden field programatically?

Thanks in advance.

Kevin Vogler
 
set the tag to runat=server
also give it an ID

declare the hidden field in your code behind

You'll then be able to reference it as if it were a web control

i.e.
on your aspx page:

<form id="Form1" method="post" runat="server">
<INPUT type="hidden" runat="server" id="hidden1">
</form>

on your code behind:
protected System.Web.UI.HtmlControls.HtmlInputHidden hidden1;

you can now refernce hidden1 like a web control
 
Thanks for your response. I'm probably not being clear here. The page I
need to read the hidden field in is not under my control. I need to read the
HTML stream from a URL. I was looking for some sample code in VB.

Thanks
Kevin Vogler
 
Thanks for the tip. I found the article yesterday but couldn't read the
page on the server. I think it's probably because of https. I kept getting
immediate timeout messages. In this particular case, I'm dead in the water.
I'd set up a webpage on our intranet to allow front office people to log in
to a remote site without typing in our password. The advantage was time
saving and it meant that no one knew the password and they couldn't access
it outside the building.

Thanks again,

Kevin Vogler
 
Back
Top