Hi
I am trying to populate a <asp:dropdownlist> in a XSLT file withdatasource pointing to a C# codebehind file method which returnsa dataview. I am using XSLT extension object. But I am getting"The 'DataSource' property is set only by the runtime. It cannotbe declared." error
code:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"xmlns:MyObj="urn:ProductInfo" xmlns:asp="remove">
<xsl:output method="html"></xsl:output>
<xsl:template match="/">
<TR>
<TD class="Input" align="right" width="200" height="21">
<P>Product Type:<SPAN class="reqd">*</SPAN></P>
</TD>
<TD class="Input" height="21">
<P>
<xsl:element name="asp:dropdownlist">
<xsl:attribute name="runat">server</xsl:attribute>
<xsl:attribute name = "id">ddlProdType</xsl:attribute>
<xsl:attribute name ="DataSource">MyObj:GetProdType()</xsl:attribute>
<xsl:attribute name = "DataTextField">TEXT</xsl:attribute>
<xsl:attribute name = "DataValueField">VALUE</xsl:attribute>
</xsl:element>
</P>
</TD>
</TR>
</xsl:template>
</xsl:stylesheet>
..................
Any ideas? Or is there any way i can populate my asp dropdownlist in xsl with dataview/datatable/Dataset returned fromcodebehind methods?
--------------------------------
From: Ganesh Kolappan
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>yU2Iaxdt7ECfHbhXKzUHVw==</Id>