TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
subhashini durgaprasad
NA
20
0
asp hidden field not retaining values after postback
Mar 22 2016 4:57 AM
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.....
Reply
Answers (
3
)
Covert vs parse
WebMatrix - Difficulty in deploying website