Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: populate dropdown list

From: lore@-----------.---------.---
To: 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/
> 


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent