score:0

Presumably, 'hdnXaxis' is the id of a HiddenFieldControl server control? Perhaps the id is not what you think

var Javascriptxvalue= $.parseJSON($("#"+ <%= hdnXaxis.ClientId %>).val());

Instead of passing strings via an input, you could use server tags to directly inject the values into the page. Like this:

<%= "alert('" + MyPublicProperty + "')" %>

This should alert you to the value of the property defined in your code behind. You could then set it to a js variable like so:

<%= "var Javascriptxvalue = '" + xProperty + "';"  %>

You will need to run this bit of code directly in an aspx/ascx/razor page to set the variables though, I think it's better than relying on a control with a particular id though.


Related Query

More Query from same tag