Click here to Skip to main content
15,909,039 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
Can Any one tell me how to find dropdownlist value in masterpage by using Javascript?

i wrote like.?

var e = document.getelementbyid(<%=(dropdownlist)contentplaceholder1.findcontrol("ddl").clientid%>).value).


but its not wokring ..

please give me some suggestions

Thanks in advacne
Posted
Comments
Sandeep Mewara 22-Jun-12 5:48am    
I see you have asked multiple questions till date but have never marked any one as answered/resolved. Why so?

1 solution

All you need is correct control name to access it in Javascript.
Just try:
JavaScript
var e = document.getElementById('<%=ddl.ClientID%>').value)


Refer: Server side Delimiters in ASP.NET[^] for delimiters usage.
 
Share this answer
 
v2

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