Hi
I am trying to generate telerik controls dynamically on a page using xml and xslt.
I am getting "unknown server tag telerik:RadTextBox" error while trying to create the control.
Below is my aspx code:
<%@ Page language="c#" Codebehind="XmlTransformerForm.aspx.cs" AutoEventWireup="false" Inherits="PubsWeb.XmlTransform.XmlTransformerForm" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<TITLE>XmlTransformerForm</TITLE>
<META name="GENERATOR" content="Microsoft Visual Studio 7.0">
<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 id="XmlTransformerForm" method="post" runat="server">
<ASP:PANEL runat="server" id="PnlForm"></ASP:PANEL>
<!--<div id="abc" runat="server"> </div>-->
<ASP:BUTTON runat="server" id="BtnSave" text="Save"></ASP:BUTTON>
</FORM>
</BODY>
</HTML>
Xslt Code:
<xsl:element name="telerik:{@type}">
<xsl:attribute name="runat">server</xsl:attribute>
<xsl:for-each select="./PROPERTIES/PROPERTY">
<xsl:attribute name="{@name}"><xsl:value-of select="current()"></xsl:value-of></xsl:attribute>
</xsl:for-each>
<xsl:for-each select="./LISTITEMS/LISTITEM">
<telerik:ListItem value="{@value}"><xsl:value-of select="current()"></xsl:value-of></telerik:ListItem>
</xsl:for-each>
</xsl:element>
Xml Code:
<FIELD type="RadTextBox" label="Requestor:" required="true">
<PROPERTIES>
<PROPERTY name="ID">txtRequestor</PROPERTY>
<PROPERTY name="ReadOnly">True</PROPERTY>
</PROPERTIES>
</FIELD>
Thanks and Regards,
Annapurna
I am trying to generate telerik controls dynamically on a page using xml and xslt.
I am getting "unknown server tag telerik:RadTextBox" error while trying to create the control.
Below is my aspx code:
<%@ Page language="c#" Codebehind="XmlTransformerForm.aspx.cs" AutoEventWireup="false" Inherits="PubsWeb.XmlTransform.XmlTransformerForm" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<TITLE>XmlTransformerForm</TITLE>
<META name="GENERATOR" content="Microsoft Visual Studio 7.0">
<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 id="XmlTransformerForm" method="post" runat="server">
<ASP:PANEL runat="server" id="PnlForm"></ASP:PANEL>
<!--<div id="abc" runat="server"> </div>-->
<ASP:BUTTON runat="server" id="BtnSave" text="Save"></ASP:BUTTON>
</FORM>
</BODY>
</HTML>
Xslt Code:
<xsl:element name="telerik:{@type}">
<xsl:attribute name="runat">server</xsl:attribute>
<xsl:for-each select="./PROPERTIES/PROPERTY">
<xsl:attribute name="{@name}"><xsl:value-of select="current()"></xsl:value-of></xsl:attribute>
</xsl:for-each>
<xsl:for-each select="./LISTITEMS/LISTITEM">
<telerik:ListItem value="{@value}"><xsl:value-of select="current()"></xsl:value-of></telerik:ListItem>
</xsl:for-each>
</xsl:element>
Xml Code:
<FIELD type="RadTextBox" label="Requestor:" required="true">
<PROPERTIES>
<PROPERTY name="ID">txtRequestor</PROPERTY>
<PROPERTY name="ReadOnly">True</PROPERTY>
</PROPERTIES>
</FIELD>
Thanks and Regards,
Annapurna