DB2 can support exporting data as XML directly - with an add-on component.. the 'XML Extender' for v7.2 upwards - here's a link:
This will cut out any processing by ASP to generate the XML and you can simply output the XML Document with a related XSLT to present it the way you want. XSLT is a pain in the a*&e to learn but once you get into the mindset it becomes relatively simple, and can be quite powerful at certain tasks.
You could then use Javascript and XPath to manipulate the data client side.
Step by step:
1. Run Stored Procedure to retrieve data as XML (it may require a specific function in DB2 - see the documentation for the XML Extender)
2. Prepare the page and create an XML Data Island.. IE has supported these for ages, Mozilla browsers do support them, but they're managed slightly differently.
3. Client-side Javascript Uses XPath and the pages Form to apply user selection and manipulate the data and apply the stylesheet. and render the Data inside a DIV element (for example)
Personally I would be cautious of this route, it can be really effective for some scenarios, but could be more trouble than it is worth:
1. If you send ALL your data to the client, you may have to move a lot of bytes through each component - DB, IIS/ASP, Network, Client - What if they only want to see the first couple of records ?
2. Potential incompatibilities with browsers - or fat code to cater for the differences. IE & mozilla browsers (e.g. Firefox) are probably fine - it's just the others that may be an issue - but do you care ?
3. Lot of technology to achieve a simple thing - complex code leads to large, overworked support teams. And if it is a steep learning curve then you could find the development effort exceeds ROI.
If your dataset is small or you want an offline version this would be fine, if you are dealing with big datasets then why not just use a form and POST or GET the results in the normal way ? Or if you want the user to think they are on the same page, use XML-HTTP. Or do you expect the users to do lots of processing (filtering/sorting) of the data each time?
XMLHTTP info:
The reason most paging is done server side is because it is more efficient on all the components involved - but it's not a strict rule... If your users do a lot of manipulation EACH AND EVERY session of use of the same dataset, then this may be the way to go.
Here's a ready made library:
and
Here's an ASP.NET guide:
And a sorting only guide:
And an IE specific one..
That should keep you busy for a while...! ;o)
Good Luck !
A smile is worth a thousand kind words. So smile, it's easy! 