This is a very basic question. I'm just on my mission to learn ASP.NET (C#). I've done classic ASP and PHP before.
For this project I have ASP.NET 2.0 at my hands.
I have a Web Form that has a jqGrid Datagrid that I want to feed XML data via AJAX. jqGrid is not the problem here, though. The "problem" is the approach that I should take to generate the XML.
How do I do that in ASP.NET?
- Do I create a new Web Form that generates that data?
- Do I use a new Web Service (that would not return the XML I need, would it?)?
- Do I somehow put a function in the existing Web Form that shows the table? If so, how?
After that decision is made: How do I output the XML? I don't want to use any XML components of ASP.NET, because it's just plain, simplistic XML with one record after each other. Using System.Xml would be too much overhead to be justified here.
<?xml version='1.0' encoding='utf-8'?>
<rows>
<page>1</page>
<total>25</total>
<records>3</records>
<row id='1'>
<cell>Row 1, Column 1</cell>
<cell>Row 1, Column 2</cell>
<cell>Row 1, Column 3</cell>
</row>
<row id='2'>
<cell>Row 2, Column 1</cell>
<cell>Row 2, Column 2</cell>
<cell>Row 2, Column 3</cell>
</row>
<row id='3'>
<cell>Row 3, Column 1</cell>
<cell>Row 3, Column 2</cell>
<cell>Row 3, Column 3</cell>
</row>
</rows>
From my previous experience with the other scripting languages, I'd just like to print out a stream of XML tags (Response.Write). Will I go to hell if I do so in ASP.NET?