Hi.
I have a webpage (say W) that is displayed inside an iframe of a main page (say M) .
All the below events are in the webpage (W).
I calculate the gridview total using jquery and store it in a hidden variable.
I then take the value in code behind from this hidden variable for further calculations on button click.
This process works neatly when i run the webpage separately.
But when its inside the main page (M), the hidden fields do not retain their values and i get error.
jquery is as follows
function TotalTC() {
var txtTotal = 0;
$(".TCTotal").each(function () {
txtTotal += isNaN(parseFloat($(this).html())) ? 0 : parseFloat($(this).html());
});
$('.calTCTotal').html(txtTotal.toFixed(2));
$('#gvToolingCost_hdnTCTotal').val(txtTotal.toFixed(2));
}
inside buttonclick
string hdnAmtTotal = (gvCostWorking.FooterRow.FindControl("hdnAmtTotal") as HiddenField).Value;
Thanks in advance.....
subhashini durgaprasadPosted Mar 22, 2016, 6:31 AM
Suthish NairPosted Mar 22, 2016, 5:24 AM
Rajeev PunhaniPosted Mar 22, 2016, 5:21 AM
Hi Subhashini,
You are not able to set hidden field value when you are using it inside iframe.First find iframe in page and then set hidden field value
If the above solution is helpful then,accept the answer.