Java script find the controls.
Please give me java script of find all asp.net controls on the page.
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Hanook159 reputationPosted Nov 21, 2013, 1:44 AM EST
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');
Mohit Sharma95 reputationPosted Nov 21, 2013, 1:52 AM EST