Onur

Özten

Bilgisayar Mühendisi & Yazılım Uzmanı


Get Control Name in JavaScript – ASP.NET

Page.RegisterHiddenField(“hdnAccountNoTextID”, txtAccountNumber.ClientID);

Now we can make use of this hidden variable to get the client ID of the textbox in Jscript.

//gets the Client ID of the txtAccountNumber textbox

var AccountNoTextID = document.getElementById(‘hdnAccountNoTextID’).value; //Access the txtAccountNumber textbox
var AccountNoText = document.getElementById(‘hdnAccountNoTextID’);