Re: [xsl] ASP script: produce HTML SELECT box?

Subject: Re: [xsl] ASP script: produce HTML SELECT box?
From: "Joe Fawcett" <joefawcett@xxxxxxxxxxx>
Date: Fri, 11 Feb 2005 08:52:29 -0000
----- Original Message ----- From: "Hardy Merrill" <HMerrill@xxxxxxxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Thursday, February 10, 2005 6:51 PM
Subject: [xsl] ASP script: produce HTML SELECT box?

In an ASP script, I've queried the database and have received back a
result set and converted that into an XML document.  What I want to do
is create an HTML "SELECT" box from that XML document.

I know I can create an XSL style sheet to render the XML document as a
SELECT box, but is that the only way to create the HTML SELECT box, when
my source for the SELECT is an XML document already?  I was just asked
this question, and it seems like there's probably a simple answer, but I
can't think of one.  Is there a way to do the XSL style sheet *in* the
ASP script, and somehow render the XML document using it, rather than
having to create a separate XSL style sheet and then calling a render
function passing it the XML document and the name of the style sheet?

Not sure if my question is clear, but does anyone know what I'm trying
to ask?  Is it doable?  Or do I just have to create a separate XSL style
sheet to render that XML doc as an HTML SELECT box?


Hardy Merrill

In You can load the xml into a dataset using readXml method and bind the dataset to an asp:listbox. I've never seen an example of binding directly.
In traditional asp there is no direct support for xml binding, you can use xslt or loop through the xml via the dom, this is also feasible in client side script.


Current Thread