XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Cameron GodfreySubject: ASP:DropDownList trigger in Xsl file
Author: Cameron Godfrey
Date: 26 Nov 2007 06:53 PM
Hi there, I have am xsl file containing a DropDownList. The DDL is set to AutoPostBack but I'm having trouble firing the onselect_edIndexChange event.

On another note, I'm wondering about the best way to pass the value of the selected index back into the xsl transform as a variable on postback.

I'm using VB.NET w/xml + xsl

Code:

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:asp="remove"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:aqua="urn:aquaterra.org">
<msxsl:script implements-prefix="aqua" language="VB">
<!--Server-side scripting starts here-->

</msxsl:script>
<xsl:param name="articleid"/>
<xsl:param name="contributorid" select="0" />
<xsl:template match="contributors">
<xsl:for-each select="user">
<xsl:choose>
<xsl:when test="@id=$contributorid">
<div id="author">
<h6 style="margin-bottom: 0;">Written by</h6>
<div class="name">
<a href="#">
<xsl:value-of select="name"/>
</a>
</div>
<div class="desc">
<xsl:value-of select="brief" disable-output-escaping="yes"/>
</div>
<form id="articlesForm" runat="server">
<asp:DropDownList ID="articlesDd" CssClass="byauthor" onselect_edIndexChanged="getArticleValue" runat="server" AutoPostBack="true">
<asp:ListItem value="-1">Articles by this author:</asp:ListItem>
<xsl:for-each select="articles/article">
<xsl:choose>
<xsl:when test="@id!=$articleid">
<asp:ListItem value="{@id}">
<xsl:value-of select="title"/>
</asp:ListItem>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</asp:DropDownList>
</form>
</div>
<div id="article">
<xsl:for-each select="articles/article">
<xsl:choose>
<xsl:when test="@id=$articleid">
<div id="top">
<div id="category">
<a href="#">
<xsl:value-of select="cat"/>
</a>
</div>
</div>
<h5>
<xsl:value-of select="title"/>
</h5>
<h6>
<xsl:value-of select="head"/>
</h6>
<p>
<xsl:value-of select="body" disable-output-escaping="yes"/>
</p>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</div>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

Posttop
Tony LavinioSubject: ASP:DropDownList trigger in Xsl file
Author: Tony Lavinio
Date: 26 Nov 2007 07:43 PM
This is a support forum for Stylus Studio users, asking questions
about using XSLT with Stylus Studio. It is not for general-purpose
XSLT questions.

Please ask in an ASP-specific forum or on the Mulberry Technologies
xsl-list.

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.