I have a webpage with an embedded iframe that loads a PDF file after performing calculations. These calculations are done on the server side based on parameters stored in a hidden variable on the parent page.
Here is the HTML markup of the parent page:
<iframe style="width:100%; height:100%;" id="iPdf"></iframe>
<input type="hidden" id="hdnPrintRo" name="hdnPrintRo" value="1" />
The source of the iframe is set dynamically.
$('#iPreRoPDf').attr('src', "PrintPDF.aspx?printid=" + printGuid);
This is how I attempt to access the hidden field from the page loaded in the iframe (PrintPDF.aspx):
string a = Request.Form["hdnField"];
However, I always receive a null value.
How can I retrieve the value of the hidden field? Should I change the way I am accessing the value on the server side?