Getting error: Illegal characters in path
what's wrong with this?
string xmlSR =
"<XmlDS><table1><phone>Value1</phone><name>jake</name></table1></XmlDS>";
myDataSet.ReadXml(xmlSR, XmlReadMode.IgnoreSchema);
DataList5.DataSource = myDataSet;
DataList5.DataBind();
Also, what's the best way to return XML from a method for binding into
a web control?
myDataSet.ReadXml(x.y(), XmlReadMode.IgnoreSchema);
I'm trying this, but it's resulting in error about no datasource, also,
its only returning the first row:
public static string yt()
{
string conn = "Data
Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirecto ry|\\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());