EditTemplate (the problem is the same in the DataGrid). I want to have
access to this controls, using javascript, but
i can't. How can i do this?
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
Sunny SharmaRank #223 · 11.1K reputationPosted Aug 10, 2013, 2:27 AM EDT
check the View Source (CTRL+U) of the rendered html page, may be it's renamed by the server like DataList_ID_ctl01_txt1.
Here 01 is the repeat count starting with 01 of the controls inside DataList.
try this:
document.getElementById('myDataList_ctl01_txt1').value='newValue';
Please share your complete aspx code having issues yet.
Hope it helps.
Happy Coding :)
Sunny SharmaRank #223 · 11.1K reputationPosted Aug 10, 2013, 1:33 AM EDT
can you share your aspx code?
Pradip Daingade194 reputationPosted Aug 10, 2013, 1:41 AM EDT
...."Test"...>"txt1"runat=server>..."txt2"runat=server>