Passing Variable to XSLT

  • Thread starter Thread starter cbanks
  • Start date Start date
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
 
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.
 
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.
 
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
 
Back
Top