Click here to Skip to main content
16,017,922 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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
Posted
Comments
Sergey Alexandrovich Kryukov 29-Aug-13 11:04am    
What is "hidden variable"?
—SA
ZurdoDev 29-Aug-13 13:08pm    
Hiddden field
Sergey Alexandrovich Kryukov 29-Aug-13 23:05pm    
:-)
ashok_89 30-Aug-13 0:22am    
sorry hidden field.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900