Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
3
Reply
asp hidden field not retaining values after postback
subhashini durgaprasad
Mar 22 2016 4:57 AM
826
Reply
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;
this value is blank.
Thanks in advance.....
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
3
)
Next Recommended Forum
I need Vertical menu with submenu css templates for website.
WebMatrix - Difficulty in deploying website