Question

I know how to use client side JavaScript with asp.net script. But I am unable to figure out how to retrieve data from database and show that data with JavaScript in an asp.net page.

Suppose I have written a JavaScript Grid. Then how can I fill that grid with data from SQL Server and show that grid on an asp.net page?

That is, how to connect C# and JavaScript on the server side?

I would be grateful if you provide me with an web-link of an example.

Hope I am able to articulate my question.

Was it helpful?

Solution

how to connect C# and JavaScript on the server side

You can use AJAX for this. It can issue a request to the server and after completion of the request response can be read in JavaScript in many formats like HTML, XML, JSON.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top