本文整理汇总了C#中System.Web.Mvc.UrlHelper.GetFullUri方法的典型用法代码示例。如果您正苦于以下问题:C# UrlHelper.GetFullUri方法的具体用法?C# UrlHelper.GetFullUri怎么用?C# UrlHelper.GetFullUri使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Web.Mvc.UrlHelper
的用法示例。
在下文中一共展示了UrlHelper.GetFullUri方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetWebResourceUrl
public Uri GetWebResourceUrl(Type someTypeInResourceAssembly, string manifestResourceName)
{
if (manifestResourceName.Contains("http"))
{
return new Uri(manifestResourceName);
}
else
{
UrlHelper Url = new UrlHelper(HttpContext.Current.Request.RequestContext);
var path = string.Format(pathFormat,
HttpUtility.UrlEncode(manifestResourceName));
return Url.GetFullUri(path);
}
}
示例2: Discover
public ActionResult Discover(string identifier)
{
if (!this.Request.IsAjaxRequest())
{
throw new InvalidOperationException();
}
UrlHelper Urls = new UrlHelper(HttpContext.Request.RequestContext);
var Requests = AjaxParty.CreateRequests(identifier, Realm.AutoDetect, Urls.GetFullUri("/auth/PopUpReturn")).ToList();
Requests.ForEach(req =>
{
req.AddExtension(new ClaimsRequest()
{
BirthDate = DemandLevel.Request,
Email = DemandLevel.Require,
FullName = DemandLevel.Request,
PolicyUrl = new Uri("http://www.google.com")
});
});
return AjaxParty.AsAjaxDiscoveryResult(Requests).AsActionResult();
}