javascript - .js variable from .cs method -


i've found topics related one, had no luck following them. so, have .js file

$(document).ready(function () {     var bubblechart = new d3.svg.bubblechart({         data: {             items: [               { text: "java", count: "236" },               { text: ".net", count: "382" },               { text: "php", count: "170" },               { text: "ruby", count: "123" },               { text: "d", count: "12" },               { text: "python", count: "170" },               { text: "c/c++", count: "382" },               { text: "pascal", count: "10" },                 { text: "something", count: "170" },             ], 

where need change "data" 1 have in database.

so far i've created method, returns list of class data (text , count).

i've tried doing

var data = <%=class/method()%>; 

but '=' symbol no go, .js allows me ":", , says

"syntax error"

tl;dr:

how change "data" in .js return of .cs method returning list?

any appreciated greatly:)

edit: no luck far ...


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -