can i run script with <% .. %> tags from inside XSL?

G

Guest

I would like to call a method of my code from within XSL but it does not seem
to like the presence of the '%' character inside the xsl.

Basicly the XSL loops through an XML writing url's into links on a menu...
I have a method that when passed a URL encrypts the query string portion and
spits it back out as URL+encoded QueryString.

I would like to call this method using somthing akin to
<%EncodeQueryString(<xsl:value-of select="url"/>)&>
inside the XSL for each loop.

Could some one please point me in the right direction with regards getting
ASP.NET script to execute from XSL?

Thank you.
 
G

Greg Collins [Microsoft MVP]

I don't know of a way to call out of XSL into your ASP.NET code. Not sure its possible.

However, you can have code inside your XSL--even C# or VB.NET code provided you are running ASP.NET (which you are).

I have a small example of how this is done here: http://www.braintrove.com/default.aspx?p=3&s=1&i=8

The example uses JavaScript, but you can just as easily convert the language used to C# or whatever. I do this all the time with my site development.
 

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top