VB.NET - Custom control and URLEditor - Asked By Nagaraj muthuchamy on 05-Jan-08 03:32 AM

Hi,
I am writing the custom control to format the xml document using xslt.
I want the path of xslt file to be selected using UrlEditor in design mode.
I done it, When i am trying to load the xslt file in xslTransform object,  the objects refers to physical path.
I want to map virtual path to load the file .
Error Message:"Could not find a part of the path 'C:\Documents and Settings\WebSites\MyCustomControl\Bin\Rss_Source\MyControl.xslt"

How to use Server.mappath() in .vb files. (Is this possible)!!!

Thankyou
Nagaraj

Server.MapPath only works when there is an active - Peter Bromberg replied to Nagaraj muthuchamy on 05-Jan-08 10:04 AM

web application and HttpContext, you cannot use it in design mode. Moreover, the path it refers to must be at or below the root of the IIS Application; it cannot be in a physical path that is outside of the web. That's what it looks like you have here.Put MyControl.xslt in the web root at the same level as the page that is using it, and map it with

Server.MapPath("MyControl.xslt").