Hello I am trying to read a textbox(runatserver) after is gets populated form the server into a javascript variable,but it gives me a console error that "can't read form NULL" however the text box is populated by the string I want to read
this is my text box:
<form runat="server">
<asp:TextBox ID="ServerSideTextBox" runat="server" />
</form>
This is how I am populating it in C#:
ServerSideTextBox.Text= Object_JSON_Class.JSON_DataTable(dt);
it gets the right data also shows the right data string but the PROBLEM is when I try to read the value of the text box like this:
var oServerSideTextBox= document.getElementById("ServerSideTextBox");
var oServerJSON_String=eval("("+oServerSideTextBox.value+")");
I get a console error that I can't read form NULL,but the text box does have the string I want to read into javascript variable,please help