From: Mervin on
Can anyone provide sample code for simply inserting the xml from an XDocument
into a XML column in SQL Server?

Thanks in advance.
From: Mervin on
I discovered the answer. If using a SqlDataSource on a FormView, within the
..aspx page change the Parameter type from Object to String. Then, set the
value of the XML column to the string of the XDocument value:

XDocument responseXML = XDocument.Load(tr);
e.Values["Response_Xml"] = responseXML.ToString();

Mervin

"Mervin" wrote:

> Can anyone provide sample code for simply inserting the xml from an XDocument
> into a XML column in SQL Server?
>
> Thanks in advance.