Binding Datalist to XML string from Object method

Is this possible?

The below method might be missguided, it's not workign and the bind

from vs.net is not rederding elements, I suspect because type strind:

public static string Gogetit(string name)
{
string conn = "Data Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|\\xx.mdf;Integrated Security=True;User Instance=True";
using (SqlConnection connection = new SqlConnection(conn))
{
connection.Open();
SqlCommand cmd = new SqlCommand("select * from book2 for xml path", connection);
cmd.CommandType = CommandType.Text;
XmlReader xr = cmd.ExecuteXmlReader();
xr.MoveToContent();
return(xr.ReadOuterXml());


Also, Is there any good reason to try try and bind a control to a

webservice? Why and is this possible? If so, does it make sense for

that webservice to return an xml dataset?

Any sample code would be greatly appreciated.

[923 byte] By [JasonNet] at [2007-12-24]