Calling functions from an ASP.NET code file using javascript

I have a JavaScript based timeline that should use data from a SQL server. JSON queries and conversions were developed as C # .NET functions in a code file associated with an .aspx page.

So, for a complete ASP.NET novice, how do you configure a function call like this from JavaScript?

I would really like it if someone had a simple sample code that I could learn / get some pointers.

Edit: I am using .NET 3.5

+1
source share
1 answer

Here is how I do it with jQuery

$.getJSON("MyAction" { Data: somedata}, function(data) {
    // do stuff on callback
});
+4
source

All Articles