-1

I want to retrieve value of a hidden filed which changes with every request send to server. For e.g when i first access the page the sessid=90334 and at the next page its like sessid=78204. The pagesource contains a tag like this <input type="hidden" name="sessid" value="69529">. I know how to read the response. I am currently using following code to read the response

 BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));

        StringBuilder response = new StringBuilder();
        String line;
        while ((line = rd.readLine()) != null) {
            response.append(line);
        }

Please tell me how can i read the changed value with each request?

android_newbie
  • 667
  • 2
  • 14
  • 32

1 Answers1

0

If you are developing asp.net application (you haven't specified MVC or asp.net), and you want to access to a hiddenfield value on server side, you should to use runat="server" attribute. Like this:

<input type="hidden" runat="server" name="sessid" value="69529">

or you can use:

<asp:hiddenfield runat="server" id="sessid" value="69529">

on server side:

var x = sessid.Value
speti43
  • 2,886
  • 1
  • 20
  • 23
  • i am not developing asp.net application. I am creating a java application which log in to some other site which require this kind to `sessid` to be provided as a parameter like this `www.example.com/abc.php?sessid=08776` – android_newbie Nov 14 '12 at 15:00