public bool IsEqualTo(IUrl other, bool caseSensitive) { if (other == null) { return(false); } if (caseSensitive) { return(this.ToString() == other.ToString()); } else { return(this.ToString().ToLower() == other.ToString().ToLower()); } }
public static MvcForm BeginForm(this HtmlHelper htmlHelper, IUrl url, FormMethod method, IDictionary<string, object> htmlAttributes) { var builder = new TagBuilder("form"); builder.MergeAttributes(htmlAttributes); builder.MergeAttribute("action", url.ToString()); builder.MergeAttribute("method", HtmlHelper.GetFormMethodString(method), true); if (htmlHelper.ViewContext.ClientValidationEnabled) { builder.GenerateId("form0"); } htmlHelper.ViewContext.HttpContext.Response.Write(builder.ToString(TagRenderMode.StartTag)); var form = new MvcForm(htmlHelper.ViewContext); if (htmlHelper.ViewContext.ClientValidationEnabled) { // htmlHelper.ViewContext.FormContext.ClientValidationEnabled = true; htmlHelper.ViewContext.FormContext.FormId = builder.Attributes["id"]; } return form; }
public void SetExportUrl(IUrl ui) { txtUrl.Text = ui.ToString(); }
public static string Url(this HtmlHelper htmlHelper, IUrl url) { return url.ToString(); }