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
ashok kumar
NA
89
36.2k
Unable to access the hidden state variable from code behind
Aug 29 2013 9:51 AM
Hi,
when i access my hidden variable from my code behind iam getting the value as 0 instead of failed ,i checked by putting alert,its entering into the if loop.so no problem there.
function CheckDllsTxt() {
$('select').each(function () {
if (($(this).val()) == '-1') {
document.getElementById('<%=HdnValidation.ClientID%>').value = 'Failed';
}
});
<asp:HiddenField ID="HdnValidation" Value="0" runat="server"/>
i placed it both inside and outside of the update panel
C#:
ScriptManager.RegisterStartupScript(this, this.GetType(), "alertUser", "CheckDllsTxt();", true);
if (HdnValidation.Value == "Failed")
{
}
else
{
}
the Function
CheckDllsTxt(); is also invoking,but iam getting
HdnValidation.Value=0,pls help me out
Reply
Answers (
3
)
text box validation in c#
How to get value of all rows from a column in a DataTable?