Try our conversational search powered by Generative AI!

How to load MediaData from URL


How can I load up a MediaData object for a given URL?

I'm trying to do this the Application_BeginRequest event currently, but can't find a way of loading the MediaData instance for the requested URL.

Jan 13, 2015 15:26

Not sure (haven't tested myself) but I think that UrlResolver is capable of doing that.

var resolver = ServiceLocator.Current.Get<UrlResolver>();
IContent content = resolver.Route(new UrlBuilder("...."));
Jan 13, 2015 21:55

Thanks Valdis, that was indeed the way to do it!

Jan 15, 2015 17:48
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.