Author: igorz
Date: 2006-09-14 11:23:40 -0400 (Thu, 14 Sep 2006)
New Revision: 65405
Modified:
Log:
implemented: RaisePostBackEvent,
refactoring: GetPostB used to build onclick client event
Modified:
2006-09-14 15:14:42 UTC (rev 65404)
2006-09-14 15:23:40 UTC (rev 65405)
@@ -1,5 +1,11 @@
2006-09-14 Igor Zelmanovich <igorz (AT) mainsoft (DOT) com>
+* LinkButton.cs:
+implemented: RaisePostBackEvent,
+refactoring: GetPostB used to build onclick client event
+
+2006-09-14 Igor Zelmanovich <igorz (AT) mainsoft (DOT) com>
+
* ImageButton.cs: implemented IButtonControl.Click, RaisePostBackEvent
2006-09-14 Igor Zelmanovich <igorz (AT) mainsoft (DOT) com>
Modified:
2006-09-14 15:14:42 UTC (rev 65404)
2006-09-14 15:23:40 UTC (rev 65405)
@@ -75,18 +75,8 @@
w.AddAttribute (HtmlTextWriterA, onclick);
if (Enabled && Page != null) {
-string href;
-bool doValidate = CausesValidation && Page.AreValidatorsUplevel ();
-if (doValidate || PostBackUrl.Length 0) {
-PostB options = new PostB (this);
-options.ActionUrl = Page.ResolveClientUrl (PostBackUrl);
-options.PerformValidation = doValidate;
-options.ValidationGroup = ValidationGroup;
-href = (options);
-}
-else
-href = (this, "");
-
+PostB options = GetPostB ();
+string href = (options);
w.AddAttribute (HtmlTextWriterAttribute.Href, href);
}
#else
@@ -106,14 +96,9 @@
}
#if NET_2_0
-[MonoTD]
-protected virtual void RaisePostBackEvent (string eventArgument)
-{
-throw new NotImplementedException ();
-}
+protected virtual
#endif
-
-void (string ea)
+void RaisePostBackEvent (string eventArgument)
{
if (CausesValidation)
#if NET_2_0
@@ -125,6 +110,11 @@
Click (EventArgs.Empty);
Command (new CommandEventArgs (CommandName, CommandArgument));
}
+
+void (string ea)
+{
+RaisePostBackEvent (ea);
+}
protected override void AddParsedS (object obj)
{
@@ -150,9 +140,17 @@
#if NET_2_0
protected virtual PostB GetPostB ()
{
-return new PostB(this, PostBackUrl, null, false, true,
- false, true, CausesValidation,
- ValidationGroup);
+PostB options = new PostB (this);
+options.ActionUrl = (PostBackUrl.Length 0 ? Page.ResolveClientUrl (PostBackUrl) : null);
+options.ValidationGroup = null;
+options.Argument = "";
+options.ClientSubmit = true;
+ = true;
+options.PerformValidation = CausesValidation && Page != null && Page.AreValidatorsUplevel (ValidationGroup);
+if (options.PerformValidation)
+options.ValidationGroup = ValidationGroup;
+
+return options;
}
#endif
Mono-patches maillist - Mono-patches (AT) lists (DOT) ximian.com