Please help, it's prob really easy but I can't get this to work. I
want to put a database field result value into a WriteAttributeString,
but I keep getting the error:
Here is the code, I know where the problem is (marked with ***) but
not how to fix it!
<%@ Page Language="C#" ContentType="text/html" %>
<%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls"
Assembly="DreamweaverCtrls,version=1.0.0.0,publicK eyToken=836f606ede05d46a,culture=neutral"
%>
<MM

ataSet
id="dsProductList"
runat="Server"
IsStoredProcedure="false"
ConnectionString='<%#
System.Configuration.ConfigurationSettings.AppSett ings["MM_CONNECTION_STRING_connCAXaspx"]
%>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSett ings["MM_CONNECTION_DATABASETYPE_connCAXaspx"]
%>'
CommandText='<%# "SELECT * FROM products" %>'
Debug="true"
Quote:
/MM ataSet
MM:PageBind runat="server" PostBackBind="true" /
|
<%@ Import Namespace="System.Xml" %>
<%@ Import Namespace="System.Text" %>
<script language="C#" runat="server">
void Page_Load(object sender, EventArgs e){
XmlTextWriter writer = new XmlTextWriter(Response.OutputStream,
Encoding.UTF8);
writer.WriteStartDocument();
writer.Formatting = Formatting.Indented;
writer.WriteComment("XML Output from ASPX C# Page. Designed by Shaine
Fisher");
writer.WriteStartElement("products");
writer.WriteStartElement("product");
writer.WriteAttributeString("itemname", Request.UserAgent);
writer.WriteAttributeString("id", <%#***
dsProductList.FieldValue("productid", Container) %>);
writer.WriteAttributeString("man", "Kustom Kit");
writer.WriteAttributeString("descsm", "This is a small
description.");
writer.WriteAttributeString("dateadded", "31/07/2004");
writer.WriteAttributeString("price", "10.49");
writer.WriteAttributeString("img", "kk109.jpg");
writer.WriteAttributeString("isnew", "f");
writer.WriteEndElement();
writer.WriteEndElement();
writer.WriteEndDocument();
writer.Close();
}
</script>
There must be a way to do this, I just can't find the solution right
now!!
Cheers
Shaine