Click here to Skip to main content
15,885,767 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a Data in my Table in which their is XML data present in the Column. Just like this.

SQL
TableName   OldContent 
ARCaseStatusMaster  <row ARCaseStatusID="2" CaseStatusName="Closed" StatusFlag="Active" CreatedUserID="11" CreatedTime="2014-04-14T13:06:46.227" UpdatedUserID="11" UpdatedTime="2014-05-15T16:23:19.790" IsDeleted="0" LockVersion="6" />

TaskCategoryMaster  <row TaskCategoryID="5" CategoryDescription="AR" CompletionStatus="Y" CreatedUserID="7" CreatedTime="2013-09-06T15:11:29.187" UpdatedUserID="11" UpdatedTime="2014-05-20T12:58:09.307" LockVersion="4" /> />



so THe TABLE NAME , Old content are the columns and 'arcasestatusmaster'&'Taskcategorymaster' are the Table and the <row....> this is start is the XML data which is store in the Column name Old COntent.

so tell me how can i take this data from the coloumn and show it into the gridview.\

plz suggeset me or tell me the another idea to save the data instead of XML aformat.,
Posted

1 solution

read the data in to DataSet or DataTable and bind it to gridview, use HttpUtility.HtmlDecode like below in your template field
ASP.NET
<asp:templatefield headertext="OldContent" xmlns:asp="#unknown">
    <itemtemplate>
        <%# HttpUtility.HtmlDecode(Eval("OldContent").ToString()) %>
    </itemtemplate>
</asp:templatefield> 
 
Share this answer
 
Comments
Ravimcts 21-May-14 23:30pm    
What is this xmlns:asp="#unknown" ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900