Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to display XML in webform?

Status
Not open for further replies.

someTimeOnly

Technical User
Oct 12, 2003
78
0
0
PK
What's wrong here. Why it's not being displayed with label control.

Code:
private void Page_Load(object sender, System.EventArgs e)
{
XmlDocument doc = new XmlDocument();
string xmlData = "<bookxmlns:bk='urn:samples'></book>";
doc.Load(new StringReader(xmlData));

Label1.Text = doc.OuterXml.ToString();
}

even
Code:
Label1.Text = xmlData;
is not displaying.
 
Are you sure that "<bookxmlns:bk='urn:samples'></book>" is good XML
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top