You should use Server.MapPath.
string XmlFile = Server.MapPath( "~/thexmlfile.xml" ).
it will get the actual path on your server.
HTH,
bill
"Jon" <> wrote in message
news:93757229-C3F5-4D34-B797-...
> Hello all,
>
> I have a usercontrol with a number of public properties. A couple of these
> properties are file paths (to xml files, etc). These file paths may be to
any
> folder in my project.
>
> However, when setting these using xmlfile="~/thexmlfile.xml" it doesn't
seem
> to work. If I do a debug at the point is does the set, is coming through
as
> "~/thexmlfile.xml" rather than the actual application path. Why is this
and
> is there a work around? I've also tried doing a contect swith to a method
> that would return the application path, eg
> xmlfile="<%=MyAppPathMethod%>/thexmlfle.xml", but alas this didn't wotk.
>
> Any help, would be much appreciated,
>
> Jon
|