Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7913129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T13:46:17+00:00 2026-06-03T13:46:17+00:00

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

  • 0

As I learned so far, client-side AJAX script can read a static .json or .xml file from server e.g. http://www.mydomain.com/all_cities.xml.

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!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T13:46:18+00:00Added an answer on June 3, 2026 at 1:46 pm

    There are a number of ways to do this – basically, the simplest is to have any standard web page (be it forms, an MVC controller/action/etc…) that acts like any normal webpage would with user input but instead of returning html, it returns XML. (By returns XML, I mean make the contents of the page solely XML and add the appropriate headers)

    Your question is too broad to give more details – but simply put, it’s easily done and the client (JavaScript in this case) can’t usually tell the difference.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

From what I have learned so far: In Objective-C you can send any message
First, thanks for all the help I've received so far from StackOverflow. I've learned
I've been trying to make an AJAX request to an external server. I've learned
from the scarcely documented FB api, I have thus far learned that I need
I've learned that iTunes XML file is actually a plist, and instead of trying
I'm new to MVC but from what I have learned so far (for example
As far i learned ....AJAX is used for partial page refresh (overcoming the flickering
So far I have learned about generating thread dump and heap dump using jstack
I learned to use "exists" instead of "in". BAD select * from table where
I learned that by trying to use the tablesorter plug in from jquery the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.