WebControl and website path

P

PiaF

Hi,

I am a begginer in .Net and i am writing a webcontrol which make an
XML stream and tranform it with an XSLT file.

I call my control like that:
<myCustom:classicleftnavigation xslfilepath="/xsl/navigator.xslt"
runat="server"
id="ClassicLeftNavigation1"></myCustom:classicleftnavigation>

But when my control is executed, it try to find the XSLT file into
c:\windows\...\xsl\navigator.xslt
But, my website is not located there.

How can i locate my website path in my webcontrol ?
 
K

Ken Cox [Microsoft MVP]

You can use the tilde (~) character to represent the root of the Web
application. Try something like

xslfilepath="~/xsl/navigator.xslt"

Does that work?

Ken
Microsoft MVP [ASP.NET]
 

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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top