Example #1
0
 /// <summary>
 /// Gets an URL with query
 /// </summary>
 /// <param name="urlHelper">The URL helper.</param>
 /// <param name="url">The URL.</param>
 /// <param name="query">The query.</param>
 /// <returns>An URL.</returns>
 public static string Url(this UrlHelper urlHelper, string url, object query)
 {
     return(UrlUtility.GetUrl(url, query));
 }
Example #2
0
 /// <summary>
 /// Gets an URL.
 /// </summary>
 /// <param name="urlHelper">The URL helper.</param>
 /// <param name="url">The URL.</param>
 /// <returns>An URL.</returns>
 public static string Url(this UrlHelper urlHelper, string url)
 {
     return(UrlUtility.GetUrl(url));
 }
Example #3
0
 /// <summary>
 /// Gets an URL for the specified identifier.
 /// </summary>
 /// <param name="urlHelper">The URL helper.</param>
 /// <param name="id">The identifier.</param>
 /// <returns>An URL.</returns>
 public static string Url(this UrlHelper urlHelper, int id)
 {
     return(UrlUtility.GetUrl(id));
 }
Example #4
0
 /// <summary>
 /// Gets an URL for the specified identifier with query.
 /// </summary>
 /// <param name="urlHelper">The URL helper.</param>
 /// <param name="id">The identifier.</param>
 /// <param name="query">The query.</param>
 /// <returns>An URL.</returns>
 public static string Url(this UrlHelper urlHelper, int id, object query)
 {
     return(UrlUtility.GetUrl(id, query));
 }
Example #5
0
        /// <summary>
        /// Redirects to page.
        /// </summary>
        /// <param name="id">The identifier.</param>
        /// <param name="query">The query.</param>
        /// <returns>A redirect result.</returns>
        protected RedirectResult RedirectToPage(int id, object query)
        {
            var url = UrlUtility.GetUrl(id, query);

            return(Redirect(url));
        }