public string GetWebResourceUrl(string webResourceName)
{
IServiceProvider serviceProvider = this.Component.Site;
string result = "";
if (serviceProvider != null)
{
IResourceUrlGenerator urlGenerator =
(IResourceUrlGenerator)serviceProvider.GetService(typeof(IResourceUrlGenerator));
if (urlGenerator != null)
{
result = urlGenerator.GetResourceUrl(this.Component.GetType(), webResourceName);
}
}
return result;
}