How to change text property of asp.net textbox with javascript
asp.net, javascript, textbox
Solution
Try this :
function openAdresYeni(p) {
document.getElementById('hdnAdresIndex').value = p;
}
NOTE : By the way if your `hdnAdresIndex` is a server control, you should use control's ClientID property to get client side id :
function openAdresYeni(p) {
document.getElementById('<%= hdnAdresIndex.ClientID %>').value = p;
}
Problem
I have a textbox that I want to change text property of it with javascript, but I can't do. My sample code below, Can anyone say what is wrong? Thanks... ``` function openAdresYeni(p) { document.getElementById('hdnAdresIndex').innerText = p; } } ```