I am having a public property in C#

public int TargetModuleZone { get; set; }

now i want to access the value of this property in js. I have done this by

var moduleZoneId = '<%= TargetModuleZone %>';

The above code works when the code is placed on aspx file inside script tag. But when i seperated the js file and included that js file in my aspx page, i was not able to get the value for above mentioned property.

Is there any way to get the property value in external js file? the js file has been included properly on aspx page.

Thanks in advance

Related posts

Recent Viewed