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
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
+ Stylus Studio Technical Forum (14621)
+ Website Feedback (249)
- XSLT Help and Discussion (7625)
-> + Use of before and after string (3) Sticky Topic
-> - How do I substitute element ty... (1)
-> + How does one add working days ... (4)
-> - Help, I have existing XLT and... (1)
-> + Need help on XSLT issue - (2)
-> + EDI to XML Conversion (7)
-> - XML To JSON Conversion using X... (1)
-> + Formatting Paragraphs to same ... (2)
-> - Grouping of records (1)
-> + Problems with xsd 1.1 (4)
-> + XML to HL7 mapping (3)
-> + XSLT 3 and Iterate (2)
-> + XSL-FO to PDF preview (3)
-> + java.lang.RuntimeException: Er... (2)
-> + Create Acroforms with Stylus X... (2)
-> + How to change XSLT parameter s... (3)
-> + how to change format of the da... (2)
-> + Search "Next 8 Results " doesn... (2)
-> - Support for Git (1)
-> + newbee (8)
-- [1-20] [21-40] [41-60] Next
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
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.

   
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.