element in masterpage in asp.net+c#
-
hi my friends i need ur help. how can i access to element of my page when i use a masterpage for create my page. in other word: i want to check the checked property of my checkbox with javascript and i can't do it. so please help me. thank you www.toolsfa.com msma
-
hi my friends i need ur help. how can i access to element of my page when i use a masterpage for create my page. in other word: i want to check the checked property of my checkbox with javascript and i can't do it. so please help me. thank you www.toolsfa.com msma
Hi, In masterPage Name and Id of page controls changs. you should use ClientID property of server controls in the page for accessing that in MasterPage i.e:
function CheckValue() { var obj=document.getElementById('<%= CheckBox1.ClientID %>'); alert(obj.getAttribute("checked")); }
Regards