onclick = ClientScriptManager.EnsureEndsWithSemicolon (onclick + Attributes ["onclick"]);
Attributes.Remove ("onclick");
}
if (onclick.Length > 0)
w.AddAttribute (HtmlTextWriterAttribute.Onclick, onclick);
onclick = ClientScriptManager.EnsureEndsWithSemicolon (onclick + Attributes ["onclick"]);
Attributes.Remove ("onclick");
}
if (onclick.Length > 0)
w.AddAttribute (HtmlTextWriterAttribute.Onclick, onclick);
w.AddAttribute (HtmlTextWriterAttribute.Href, href);
}
base.AddAttributesToRender (w);
w.AddAttribute (HtmlTextWriterAttribute.Href, href);
}
base.AddAttributesToRender (w);
- if (CausesValidation && Page.AreValidatorsUplevel ()) {
- ClientScriptManager csm = new ClientScriptManager (Page);
+ if (CausesValidation && page.AreValidatorsUplevel ()) {
+ ClientScriptManager csm = new ClientScriptManager (page);
- String.Format ("javascript:{{if (typeof(Page_ClientValidate) != 'function' || Page_ClientValidate()) {0};}}",
- csm.GetPostBackEventReference (this, String.Empty)));
+ String.Concat ("javascript:{if (typeof(Page_ClientValidate) == 'function') Page_ClientValidate(); ",
+ csm.GetPostBackEventReference (this, String.Empty), ";}"));
- w.AddAttribute (HtmlTextWriterAttribute.Href, Page.ClientScript.GetPostBackClientHyperlink (this, ""));
+ w.AddAttribute (HtmlTextWriterAttribute.Href, page.ClientScript.GetPostBackClientHyperlink (this, String.Empty));
protected virtual PostBackOptions GetPostBackOptions ()
{
PostBackOptions options = new PostBackOptions (this);
protected virtual PostBackOptions GetPostBackOptions ()
{
PostBackOptions options = new PostBackOptions (this);
- options.ActionUrl = (PostBackUrl.Length > 0 ? Page.ResolveClientUrl (PostBackUrl) : null);
+ options.ActionUrl = (PostBackUrl.Length > 0 ?
+#if TARGET_J2EE
+ CreateActionUrl (PostBackUrl)
+#else
+ Page.ResolveClientUrl (PostBackUrl)
+#endif
+ : null);
options.ClientSubmit = true;
options.RequiresJavaScriptProtocol = true;
options.PerformValidation = CausesValidation && Page != null && Page.AreValidatorsUplevel (ValidationGroup);
options.ClientSubmit = true;
options.RequiresJavaScriptProtocol = true;
options.PerformValidation = CausesValidation && Page != null && Page.AreValidatorsUplevel (ValidationGroup);