Question

I have a question to understand the concept of ASP.NET with each client browser.

I am trying to update the XML on server when a user hits a particular page on my website. This page is dynamic, but too large so I want it to load using an XML file also I have several drop downs on the page when user changes the value in drop down, I need to refresh the data based upon the selection, additionally my drop down is a custom designed here I do not get and selectedIndex change event.

So I'm using JQuery to get the changed value in my drop down and planning to read XML from jQuery and display the data.

But since the XML is updated on hit of the page on server, I want know, if multiple users hit the same page, will the data displayed as per each users selection or it will mix the data and show the last hits record.

Was it helpful?

Solution 2

I would like to introduce a new way that it helped me to answer my above question.

What i did here is

on Page load we added all the information related to each section in different hidden fields. suppose i have three section with my custom drop down!

What exactly we implemented is that on click on my custom drop-down, we separated the values from the hidden field with the separator we entered and displayed the data accordingly, small part of logic but it helped in displaying the data without post back.

and Jquery helps a lot to me for just changing the inner html of my block.

OTHER TIPS

If I'm not mistaken about your question, you basically ask the following:

You have an XML file, which is updated, on some event from user. The page, which is displayed to the user is based on this XML file. What info will users see, when multiple users are working with the application?

This greatly depends on how you are using that file. In general, if you try to write that file to disk each time, users will see the last update. Basically update from the last user.

However, you can synchronize access to this file, write the file on per-user basis and you will see a per-user output:

<data>
    <selectedData user="user name">123</selectedData>
    <!-- and so on -->
</data>

UPDATE: For anonymous users this would not work well. However, if you need to store the selection only for the current user, you can use SessionState and not an XML file.

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