views:

28

answers:

1

Hi guys,

string str = HtmlPage.Document.DocumentUri.AbsoluteUri;

gives me

http://localhost/MyApplication/Pages/Silverlight/SLMain.aspx

but I just need the ApplicationPhysicalPath - in asp.net I can do HostingEnvironment.ApplicationPhysicalPath to do that, but I don't know how to do that for silverlight. Any hints?

Thanks,

Voodoo

A: 

Try:

 string str = HttpContext.Current.Server.MapPath(HtmlPage.Document.DocumentUri.AbsoluteUri);
Ivan Ferić
I am pretty sure you can not use this in Silverlight, did I miss something?
VoodooChild
It seems to work here: http://forums.silverlight.net/forums/p/121235/273334.aspx
Ivan Ferić