BizTalk Utilities CV ,   Jobs ,   Code library
 
Home Page


Add/Edit your code items
Search the code library
Browse for the code library


Microsoft ASP
Read/write data with VB using ASP pages


 
 

<< LAMP 


By Robert Kviby
First Posted 06/11/2002
Times viewed 1189

Include an ASP-file in XSL (JITIC Solution)


Summary When we created JITIC we built an "online status" function which returns data about all users in XML. We get the XML-data from our indexing server. However, we also needed to check if the user was logged in, so we needed to execute some ASP-code within the XSL-file while we parsed the XML... Hmmm, how to do that? See our solution below...

The solution we came up with that we had to check if the user was logged in using ASP and we had to do this for every single user. Hence, we had to, from the XL-file, call an ASP-file and send a querystring to this file with the id for the user.

So, in the XSL-file we parse the XML to HTML. And when doing this we create a script-tag that will (in the HTML) include a javascript-file using like this:
<script language=javascript src=jsfile.js></script>

However, instead of including a file with the extension .js we included a file with the .asp extension and hence we could execute whatever asp-code we wanted and return it as ContentType = application/x-javascript


Check out the XSL and ASP-code below.

Thanks for your time!
Robert Kviby
robert@ngcode.com
Check out JITIC at www.jitic.net

Additional information

Further additional information


Rate this article on a scale of 1 to 10 (2 votes, average 7)

Your vote :  

<< LAMP 





Leave a comment for this article
Your name
Your email (optional)
Your comment
Optional: Upload an attachment
Enter the code shown:

 
 

    Email TopXML