I have a JavaScript-based timeline which needs to use data from an SQL server. The queries and the JSON conversions have been worked out in the form of C#.NET functions within a code file related to an .aspx page.
我有一个基于javascript的时间轴,它需要使用来自SQL服务器的数据。查询和JSON转换以c#的形式进行。NET函数在与.aspx页面相关的代码文件中。
So for a complete newbie to ASP.NET, how do you set up a function call like this from JavaScript?
所以对于一个完整的新手来说。NET,如何从JavaScript中设置这样的函数调用?
I would love it if someone had some simple example code I could learn/get some pointers from.
如果有人有一些简单的示例代码,我就会喜欢它。
Edit: I am using .NET 3.5
编辑:我使用。net 3.5。
1 个解决方案
#1
4
This is how I do it with jQuery
这就是我使用jQuery的方法
$.getJSON("MyAction" { Data: somedata}, function(data) {
// do stuff on callback
});
#1
4
This is how I do it with jQuery
这就是我使用jQuery的方法
$.getJSON("MyAction" { Data: somedata}, function(data) {
// do stuff on callback
});