Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

As I learned so far, client-side AJAX script can read a static .json or .xml file from server.

But I need to generate a .json or .xml file dynamically according to the user input at client-side. e.g. imagine that the user selects a state from DropDownList1 and AJAX should fill DropDownList2 with that state's cities; while I don't like to send all cities and then filtering desired cities in client-side!

So, I would like to know how ASP.NET can handle this e.g. when it sees "http://www.mydomain.com/cities.json?state=9" then it should response with a dynamically created json file named cities.json which contains the cities which are in state #9?

Thanks in advance!

share|improve this question

closed as off topic by ChrisF May 8 '12 at 10:50

Questions on Web Applications Stack Exchange are expected to relate to web applications within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

This would be better asked on Stack Overflow, but I think you'd need to show more research and include more details for it to get a decent answer there. –  ChrisF May 8 '12 at 10:51

Browse other questions tagged or ask your own question.