Reputation: 931
I simply try to convert "~/Telerik.Web.UI.WebResource.axd?imgid=310aa01d42ba47e1af090c60b520dd8e&type=rbi"
this path to physical path.
I simply tried below code but it throws Exception and says "Illegal characters in path".
Server.MapPath("~/Telerik.Web.UI.WebResource.axd?imgid=310aa01d42ba47e1af090c60b520dd8e&type=rbi")
I am not exactly sure it is possible to do that or not.
Edit: I actualy have RadBinaryImage That holds the url. I want to have byte array from RadBinaryImage and this is what i try to access file.
Upvotes: 1
Views: 1815
Reputation: 15663
Telerik.Web.UI.WebResource.axd
is not physical resource, so it hasn't an equivalent on disk. Probably is loaded/readed from a dll by its corresponding handler.
Upvotes: 0
Reputation: 101594
How about [control].ResolveUrl
instead?
MapMath
is looking for a file, which &
is not accepted in a file path. You're just looking to get the "absolute URL" (or at least one that's folder agnostic) that the client can use.
Upvotes: 0
Reputation: 190897
Try
Server.MapPath("~/Telerik.Web.UI.WebResource.axd") + "?imgid=310aa01d42ba47e1af090c60b520dd8e&type=rbi)"
Upvotes: 1