serialize it with System.Web.Script.Serialization.JavaScriptSerializer
class and assign to javascript var
dummy sample:
<% var serializer = new System.Web.Script.Serialization.JavaScriptSerializer(); %>
var jsVariable = <%= serializer.Serialize(array) %>;
More Related Contents:
- How to get Windows Explorer type look and feel inside my Application? [closed]
- How to use __doPostBack()
- Calling JavaScript Function From CodeBehind
- Difference between RegisterStartupScript and RegisterClientScriptBlock?
- Plus sign in query string
- How to call code behind server method from a client side JavaScript function?
- how to call an ASP.NET c# method using javascript
- asp.net: Invalid postback or callback argument
- Printing to a client printer from a web app
- How to return JSON with ASP.NET & jQuery
- Is there a standard way to encode a .NET string into JavaScript string for use in MS Ajax?
- Javascript serialization of DateTime in asp.net is not giving a javascript date object?
- ASP.NET jQuery Ajax Calling Code-Behind Method
- Opening a URL in a new tab
- Asp .NET Button – OnClientClick=”return function()” vs OnClientClick=”function()”
- Detect Browser Close on Asp.net
- Document.Ready() is not working after PostBack
- ASP.Net double-click problem
- Error handling when downloading file from ASP.NET Web Handler (.ashx)
- JavaScript: Alert.Show(message) From ASP.NET Code-behind
- How to Format a date pass as a parameter to a function and return data is a string with “yyyy/mm/dd” format?
- Memory leak in Data Access layer using enterprise library
- The breakpoint will not currently be hit. No symbols have been loaded for this document in a Silverlight application
- What happens in BeginProcessRequest()?
- Can’t get sql server compact 3.5 / 4 to work with ASP .NET MVC 2
- IIS Express Immediately shutting-down running site after stopping web application
- Fancybox – ASP.NET button not working
- Convert JavaScript Regex to C#
- UTF-8 or UTF-16 or UTF-32 or UCS-2
- Opposite of [compare(” “)] data annotation in .net?