[thelist] howto: querystring modifying xslt:param

Andrew Martin comitque at hotmail.com
Thu Oct 14 15:59:49 CDT 2004

I have another newbie xml/.net question.  All apologies.  I'm trying to get 
an aspx file to modify an XSLT file based on a querystring.  ie. 
recipe.aspx?recipe=3 will add this line to the XSLT file:
<xsl:param name="recipe" select="3" />

I'm getting this error message pointing to 'xslArg.AddParam...' when I 
execute the .aspx file:
Compiler Error Message: BC30188: Declaration expected.

vb file:
Imports System
Imports System.IO
Imports System.Xml
Imports System.Xml.XPath
Imports System.Xml.Xsl
Imports System.Web.UI.Page
Imports System.Collections
Imports System.ComponentModel
Imports System.Data
Imports System.Web

Public Class transF
dim xslArg = new XsltArgumentList()
xslArg.AddParam("recipe", "3") 'this is set to 3 just for example -- later 
it will be a querystring variable
xmlDisp.TransformArgumentList = xslArg
End Class

ASPX file:
<%@ Page Inherits="transF" Src="recipe.aspx.vb" %>
<asp:xml runat="server" id="xmlDisp" DocumentSource="recipes.xml" 
TransformSource="recipe.xslt" />

<xsl:param name="recipe" />


More information about the thelist mailing list