Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > can i run script with <% .. %> tags from inside XSL?

Reply
Thread Tools

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

 
 
=?Utf-8?B?SmFtZXM=?=
Guest
Posts: n/a
 
      06-13-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
 
      06-13-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
 
 
 
 
Braintrove Braintrove is offline
Junior Member
Join Date: Apr 2007
Posts: 5
 
      04-06-2007
The link to the above Braintrove article has been updated to:

Prevent Namespace Prefixes from Being Copied to the Output
http://www.braintrove.com/article/8
 
Reply With Quote
 
 
 
Reply

Thread Tools

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
(How) Can you run another ruby script, from a ruby script? 3lionz Wexler Ruby 2 08-24-2010 04:27 AM
Noob Q: Different ways to run code in script tags Kenny Javascript 1 11-13-2008 06:46 PM
Script inside the header tags Erik Cruz ASP .Net Web Controls 2 09-28-2004 06:21 PM
Evaluating struts tags inside my own custom tags... A. Brinkmann Java 2 04-16-2004 07:44 AM
Add script tags to page at run time WFB ASP .Net 1 11-12-2003 10:17 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57