I am trying to get the value of the textbox in a javascript, but its not working. Given below is the code of my test page
<%@ Page Title=\"\" Language=\"V
Since you have master page and your control is in content place holder, Your control id will be generated different in client side. you need to do like...
var TestVar = document.getElementById('<%= txt_model_code.ClientID %>').value;
Javascript runs on client side and to get value you have to provide client id of your control