Hi
I am trying to populate a <asp:dropdownli st> 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:styleshe et version="1.0"xm lns:xsl="http://www.w3.org/1999/XSL/Transform"xmlns :MyObj="urn:Pro ductInfo" xmlns:asp="remo ve">
<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:dropd ownlist">
<xsl:attribut e name="runat">se rver</xsl:attribute>
<xsl:attribut e name = "id">ddlProdTyp e</xsl:attribute>
<xsl:attribut e name ="DataSource">M yObj:GetProdTyp e()</xsl:attribute>
<xsl:attribut e name = "DataTextField" >TEXT</xsl:attribute>
<xsl:attribut e 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>yU2Iaxdt7EC fHbhXKzUHVw==</Id>