Processing XML form input in ASP
Posted
by Omar Kooheji
on Stack Overflow
See other posts from Stack Overflow
or by Omar Kooheji
Published on 2010-05-20T14:28:37Z
Indexed on
2010/05/20
14:30 UTC
Read the original article
Hit count: 313
asp
I'm maintaining a legacy application which consists of some ASP.Net pages with c# code behinds and some asp pages. I need to change the way the application accepts it's input from reading a set of parameters from some form fields to reading in one form field which contains contains some XML and parsing to get the parameters out.
I've written a C# class that takes an The NameValueCollection from the C# HttpRequest's Form Element.
Like so
NameValueCollection form = Request.Form;
Dictionary<string, string> fieldDictionary = RequestDataExtractor.BuildFieldDictionary(form);
The code in the class looks for a particular parameter and if it's there processes the XML and outputs a Dictionary, if its not there it just cycles through the Form parameters and puts them all into the dictionary (Allowing the old method to still work)
How would I do this in ASP? Can I use my same class, or a modified version of it? or do I have to write some new code to get this working?
If I have to write ASP code Whats the best way to process the XML in ASP?
Sorry if this seems like a stupid question but I know next to nothing about ASP and VB.
© Stack Overflow or respective owner