PC Review


Reply
Thread Tools Rate Thread

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

 
 
=?Utf-8?B?SmFtZXM=?=
Guest
Posts: n/a
 
      13th Jun 2006
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.
 
Reply With Quote
 
 
 
 
Greg Collins [Microsoft MVP]
Guest
Posts: n/a
 
      13th Jun 2006
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.

--
Greg Collins [Microsoft MVP]
Visit Brain Trove ( http://www.BrainTrove.com )


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error when using <% %>and <script></script> tags -Karl Microsoft ASP .NET 2 18th Jun 2007 03:55 PM
Re: can i run script with <% .. %> tags from inside XSL? Greg Collins [Microsoft MVP] Microsoft ASP .NET 0 25th Oct 2006 05:29 PM
Re: can i run script with <% .. %> tags from inside XSL? Greg Collins [Microsoft MVP] Microsoft ASP .NET 0 25th Oct 2006 05:29 PM
Using <Script> tags to calls a script from another server Chuck Microsoft ASP .NET 2 12th Nov 2004 10:57 PM
Strings inside XML Tags Roger Helliwell Microsoft C# .NET 4 23rd Jul 2004 06:39 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:03 AM.