Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: populate dropdown list [Thread Next] Re: populate dropdown listTo: NULL Date: 5/12/2009 8:59:00 AM this is part of search.xslt
<xsl:choose> <xsl:when test="$SearchName='SearchTalent'">
<td width="60%">
<asp:DropDownList DataSource ="sqlEmployee" DataSourceID="CodEmployee"
DataTextField="Surname" >
</asp:DropDownList>
<xsl:otherwise>
<td class="TableCell" >
<input type="text" id="{@Id}" name="{@Id}" value=""
class="InputStandardBorder"></input>
</td>
</xsl:otherwise>
in Search.aspx
<asp:SqlDataSource ID="sqlEmployee" runat="server" ConnectionString="<%$
ConnectionStrings:gsConnTalentPool %>"
SelectCommand="SELECT CodEmployee, Surname, Name FROM tbEmployees "
></asp:SqlDataSource>
Tank you for your replay
Lore
"Martin Honnen" wrote:
> lore wrote:
> > How to populate asp dropdownlist with xslt?
>
> XSLT transforms an input tree, usually generated by parsing an XML
> document, into a result tree that can be optionally serialized as XML or
> HTML or plain text. I am not sure what kind of "asp dropdownlist" you
> are talking about. If that is classic ASP then a dropdownlist is nothing
> but a HTML select element so you would simply write an XSLT stylesheet
> that creates a HTML document with an HTML select form element. If you
> are talking about ASP.NET and a server-side ASP.NET control for a
> dropdownlist then that is more difficult to achieve with XSLT and you
> might consider alternative options such as databinding.
>
> In any case you might want to show us the relevant part of your XML from
> which you want to extract the data to populate the dropdown.
>
>
> --
>
> Martin Honnen --- MVP XML
> http://msmvps.com/blogs/martin_honnen/
>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
