I am making application page that add, edit, delete the list items.
Now I want to make Edit page, and I retrieved the Title and Body value.
But in body value, it returned like this.
<div class="ExternalClassD0DCC2B7E533459DA80922D67FE8A7A4"><p>Test 2</p></div>
I don`t want to see div tag. How can I do that?
My code is below.
private void DisplaySelectedListItem()
{
string siteUrl = SPContext.Current.Web.Url;
int id = int.Parse(Request.QueryString["ID"]);
using (SPSite spSite = new SPSite(siteUrl))
{
using (SPWeb web = spSite.OpenWeb())
{
SPList list = web.GetListFromUrl("Lists/List/AllItems.aspx");
SPListItem item = list.GetItemById(id);
txtTitle.Text = item["Title"].ToString();
txtBody.Text = item["Body"].ToString();
}
}
}