java script find the controls.
Please give me java script of find all asp.net controls on the page.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Mohit SharmaPosted Nov 21, 2013, 6:52 AM
HanookPosted Nov 21, 2013, 6:44 AM
There are following ways to find any controls using javascript
1). Simple page ->
var txt_name = document.getelementsbyid('txt_employee_name');
2). Content page ->
var txt_name = document.getelementsbyid('<%=txt_employee_name.ClientId%>');
3). With Ajax ->
var txt_name = $get('txt_employee_name');