2

I have a DataTable in PageLoad, I need to pass to it to a JQuery file to generate the BingMap contents

 protected override void OnLoad(EventArgs e)
 {
    DataTable dt = dtLocations;
 }

my JQuery file is Included in .ascx page

<script type="text/javascript" src="/script/BingMap/BingMapJS.js" ></script>

Need to send this "dt" to JQuery file

2 Answers 2

2
string json = JsonConvert.SerializeObject(table);

http://james.newtonking.com/projects/json/help/index.html?topic=html/T_Newtonsoft_Json_JsonConvert.htm

Sign up to request clarification or add additional context in comments.

Comments

0

Most of jQuery libraries accept Json as data format to process, you can follow this approach to convert your DataTable into Json result and then pass that to Bing JS library to process.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.