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

Discussion in 'ASP .Net' started by =?Utf-8?B?SmFtZXM=?=, Jun 13, 2006.

  1. 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.
     
    =?Utf-8?B?SmFtZXM=?=, Jun 13, 2006
    #1
    1. Advertising

  2. 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 )
     
    Greg Collins [Microsoft MVP], Jun 13, 2006
    #2
    1. Advertising

  3. =?Utf-8?B?SmFtZXM=?=

    Braintrove

    Joined:
    Apr 6, 2007
    Messages:
    5
    Braintrove, Apr 6, 2007
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. A. Brinkmann
    Replies:
    2
    Views:
    1,112
    A. Brinkmann
    Apr 16, 2004
  2. Greg Smith
    Replies:
    35
    Views:
    3,217
    Alex Kay
    Oct 24, 2004
  3. Replies:
    1
    Views:
    3,653
    A. Bolmarcich
    May 27, 2005
  4. Replies:
    0
    Views:
    574
  5. Kourosh
    Replies:
    6
    Views:
    868
    Peter Flynn
    May 17, 2006
Loading...

Share This Page