Aceess server control from javascript
Can I aceess server controls of asp.net from a javascript separate .js file if yes then how???
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
Madhu KRank #1,514 · 1.1K reputationPosted Feb 17, 2011, 9:15 PM EST
function testfromfile()
{
var txt=document.getElementById('TextBox1')
txt.value='newtestfailed';
alert(txt.value);
}
Call the js file in aspx page head section
Body
Suthish NairRank #92 · 22.8K reputationPosted Feb 21, 2011, 1:22 AM EST
document.getElementById('<%=TextBox1.ClientID%>').value