How to get hidden fields from HTML?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • GeFox
    New Member
    • Nov 2008
    • 1

    #1

    How to get hidden fields from HTML?

    Hey guys.
    I have created a simple program , that parses HTML from web-pages , using HttpWebRequst & HttpWebResponse classes. In this parsed HTML I want to find all hidden fields. I'm using Regular Expressions for it. But there is one glitch.. When I'm getting HTML with HttpWebResponse class , no hidden fields contains in it... But when I looking at this HTML in my browser (FireFox) with Firebug plugin , I can see all those fields.

    So the question : How to get hidden fields from HTML , using base HttpWebRequest & HttpWebResponse classes & Regex?

    BTW : I'm writing in C#.
    P.S Sorry for my English... if there are a lot of errors
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    You are looking for <input type="hidden"> fields right?
    That's what a hidden field is. And they should be available to you in the string of data from HttpWebRequest

    I jsut tested and I get hidden fields just fine
    <input type="hidden" name="_hfTimeZo ne" id="_hfTimeZone " value="-5" />

    Comment

    • r035198x
      MVP
      • Sep 2006
      • 13225

      #3
      Perhaps there is something you are doing wrong in your code. You might have to post the relevant parts of your code.

      Comment

      Working...