473,624 Members | 2,103 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Populating asp:dropdownlis t in XSLT file using extension object

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

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

Similar topics

8
2044
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 server shows primary site, but without informations from incuded file.
1
342
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 option like "< Select a Region>" to be displayd as teh selected value. Currently it displays the first value of the returned dataset. I cannot seem to get this right, below is my code:
1
2465
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 presses the submit button. - The submit button then calls a function that sets a asp:lable to that value selected. - PROBLEM: No matter what value the user selects, the asp:lable always
2
9563
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 id="numYears" runat="server" name="numYears"> <asp:ListItem Value="0" Text="0 years" Selected="true" /> <asp:ListItem Value="1" Text="1 year"/>
1
2275
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 values to asp:textbox but not asp:dropdownlist code is as follow when i call this function BindShipper(); function BindShipper(SearchResultFor, vendorID, localID,companyName, companyAdd1, companyAdd2, companyCity, companyState, companyZip,...
7
2032
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 time to allow me to have the first option in the list a ‘listitem’ saying something like ‘please pick an option’, and then the rest of options coming from the database. <asp:dropdownlist id="fm_Category" runat="server"...
2
4722
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 the ddl.) ie: Country Value Australia 1
1
1557
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 dropdownlist should be filled with the values in field NAME from the same dataset used in the datagrid. The default value of each dropdownlist should be the value of NAME by
2
1291
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 view, how to bind it and how to add the selection items to the list. My problem is that in all the examples I can find all show how to add the selection items from a database only. I don't always want to do that. Sometimes I want to add just from a...
0
8679
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8335
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7159
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6110
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5563
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4174
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2606
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1785
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1482
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.