Click here to Skip to main content
15,943,085 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

as i am using hiddenfield in my c# code. i am putting my value in hiddenfield in c# code but in source(java script) its showing null.

My java script code is this:
JavaScript
<script language="javascript" type="text/javascript">
function OpenCV() 
{    
    var v = document.getElementById("ctl00_ContentPlaceHolder1_HiddenField1").value;
    window.open('resume/' + v + '.pdf');
}

its showing me null value for variable v. Please help me.

Thanks.
Posted
Updated 19-Sep-11 23:51pm
v2
Comments
koolprasad2003 20-Sep-11 5:56am    
show your codeBehind code ? when this OpenCV() get called ?

1 solution

Hi,

Use Jquery to get exact id of asp.net control like

JavaScript
$("#HiddenField1").val;


Step into Jquery

All the Best.
 
Share this answer
 

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