I have an array in asp.net in page_load method which I want to pass to javascript :
EmpDBClass empobj = new EmpDBClass();
DataTable dtCheckValue = empobj.dtGetDataTable("EPS_GetBookedValues");
var bookedarray = dtCheckValue.AsEnumerable().Select(r => r.Field<string>("Name")).ToArray();
javascript:
var bookedSeats = <%new System.Web.Script.Serialization.JavaScriptSerializer().Serialize(this.bookedarray);%>
problem is Bookedarray can not be found .
Kindly help