473,408 Members | 2,417 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Populating asp:dropdownlist in XSLT file using extension object

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>
Nov 12 '05 #1
0 3187

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: memento | last post by:
Hello, How to include file into an ASP program? I was trying with this command: <!-#include file="INC_file.asp" -> but unfortunately it does not work :( There isn't any error message. IIS...
1
by: Marius | last post by:
Hi all, I need an asp:dropdownlist on a webform that is databound to a dataset. This works fine and returns the data to populate my dropdownlist. In the DB I only have valid data, but I need a...
1
by: Harry | last post by:
Hi, Just seeing if anyone can help me with a problem I am having with drop down lists. - I have a asp:dropdownlist that gets its values from a database. - The user then selects a value then...
2
by: amessimon | last post by:
I need to display a drop down list which holds up to 250 listitems. I'd like to create this programmatically rather than have to hardcode it into the page. For example <asp:DropDownList...
1
by: Urmal Patel via .NET 247 | last post by:
I have problem with asp:Dropdownlist. I have a dropdownlist control in Page1.aspx and I want to assign value and Text to dropdown list form Page2.aspx from java script function. I am able to assign...
7
by: Lastie | last post by:
Hi all, I’ve got a ‘dropdownlist’ web control and I can add ‘listitem’ no problem. I can also bind data from an SQL database fine. My problem is that I want to do both at the same...
2
by: HH | last post by:
Hi, I have a dropdown list that is datafilled via a SQL table. The text part is always unique. (A list of countries) Each country is assigned one of three numbers. (This being the 'value' of...
1
by: Miguel Dias Moura | last post by:
Hello, I have two questions concerning Asp:DropDownList 1. How to fill a DropDownList from runtime and set its default item? 2. How do use a DropDownList in each datagrid record? All...
2
by: RobertTheProgrammer | last post by:
Hi again, Okay, I decided the GridView is the way to go to solve my problem. But now I've got another problem. I've found plenty of examples about how to add a DropDownList item to the grid...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.