I have HTML/CSS that I retrieve from a page. I want to get the value, debt, from the file.
The file is something like the following:
...
<tr>
<td width="10%"><input type="hidden" name="number" value="000115900">
<input type="hidden" name="debt" value="2.282,00">
<input type="hidden" name="id" value="01039">
<input type="hidden" name="idbill" value="129">
...
I want the debt value, in this case: 2.282,00
I did:
int first = responseFromServer.IndexOf("<input type=\"hidden\" name=\"debt\" value=\"");
int last = responseFromServer.IndexOf("\">");
string str2 = responseFromServer.Substring(first + 1, last - first -1);
And it is not working. I get that the value must be non negative or non zero. Whats is wrong?