M
Martin Dew
I have a page which upon opening gets information from a database, the field
it returns has structured xml stored in it.
private void Page_Load(object sender, System.EventArgs e)
{
if (!IsPostBack) {
GetRecordFromServer(this.Request.QueryString[0].ToString());
}
}
private void GetRecordFromServer(string searchID) {
DataSet ds = dbAuditLog.GetEntry(new Guid(searchID));
DataTable dt = ds.Tables[0];
Response.ContentType = "Text/XML";
Response.Output.Write(dt.Rows[0]["XMLText"].ToString());
}
The problem I am having is that the resulting page does not quite display
properly, it always seems to add the following to the end of the xml, I just
want the xml from my field to be streamed to the response, and that is all,
can anyone help ?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>dbaudmess</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form name="Form1" method="post"
action="dbaudmess.aspx?searchID=551687bf-07db-4199-8be6-2a2682d6e49f"
id="Form1">
<input type="hidden" name="__VIEWSTATE"
value="dDwtNjU0MzcyMTk1Ozs+/NB5NnLZUiFzN88M2i+3c1vA1l0=" />
</form>
</body>
</HTML>
it returns has structured xml stored in it.
private void Page_Load(object sender, System.EventArgs e)
{
if (!IsPostBack) {
GetRecordFromServer(this.Request.QueryString[0].ToString());
}
}
private void GetRecordFromServer(string searchID) {
DataSet ds = dbAuditLog.GetEntry(new Guid(searchID));
DataTable dt = ds.Tables[0];
Response.ContentType = "Text/XML";
Response.Output.Write(dt.Rows[0]["XMLText"].ToString());
}
The problem I am having is that the resulting page does not quite display
properly, it always seems to add the following to the end of the xml, I just
want the xml from my field to be streamed to the response, and that is all,
can anyone help ?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>dbaudmess</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form name="Form1" method="post"
action="dbaudmess.aspx?searchID=551687bf-07db-4199-8be6-2a2682d6e49f"
id="Form1">
<input type="hidden" name="__VIEWSTATE"
value="dDwtNjU0MzcyMTk1Ozs+/NB5NnLZUiFzN88M2i+3c1vA1l0=" />
</form>
</body>
</HTML>