XML from SQL into Gridview (Friendly names)
I have data in an SQL database and have managed to display it in Gridview using .net
The problem I need to overcome is to figure out how (Programatically) to display the xml data in friendly form.
For testing purposes I am using the XML node item name of Pres1 and another one called pres2.
I need the c# behind the aspx page to create an XML doc from the SQL database and then overide the existing grid cell (19) with the correct name.
Please note the XML document does not exist, the data is in a SQL database (Colomn "presentationData") with the connection string already in place.
Pasre the XML file into a string, use repace on the nodes you want to change then name parse back to xml and databind to your gridview should do the trick.
Here is example of parsing xml to string:
then create a XMLReader to read the contents of the XMLString:
string NewXMLString = XMLString.Replace("<OLDNODE>", "<NEWNODE>");
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread