Passing Variable to XSLT

C

cbanks

I have a ASP.NET application written in VB.net 2003 with a form I am
using to create an export file. Using XslTransform class I have a form
that collects data and executes a stored procedure to pull information
from my SQL Database. I would like to include information from a
textbox on the form in the XSL stylesheet. Can some one please explain
how I can pull information from my code and pass it to the stylesheet?

Thanks
Charles
 
A

agapeton

One thing that comes to mind, though I'm sure I'm overcomplicating
it... is to make the XSLT an aspx page (you can specify the
appropriatae content-type in the codebehind) and pass it a query
paramater (MyXslt.xsl.aspx?Id=7). I do this with my ECMAScript
(JavaScript) at times like "GetFirefoxSVGInformation.js.aspx?id=314"

This would work clientside, but should be close on serverside too.
 
C

cbanks

Being new to all of this, I need to ask one more question. Once the
variable is passed, how do I insert it into my xslt?
<xsl:for-each select="PrintChecks/tblChecks">
<xsl:text>TRANS CHECK </xsl:text>
<xsl:text></xsl:text><xsl:value-of select="fldFirstName"/>
<xsl:text> </xsl:text><xsl:value-of select="fldLastName"/>
var needs to go here
....
/xsl:for-each

Thanks again.
 
C

cbanks

I was able to figure everything out thanks to the link Peter sent.
Just goes to show ya that a little help from some one in these groups
goes a long way!

Thanks again!
Charles
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top