[WebCategory ("Behavior")]
#if NET_2_0
[Themeable (false)]
- public virtual
-#else
- public
#endif
- string CommandArgument {
+ public string CommandArgument {
get {
return ViewState.GetString ("CommandArgument", "");
}
[WebCategory ("Behavior")]
#if NET_2_0
[Themeable (false)]
- public virtual
-#else
- public
#endif
- string CommandName {
+ public string CommandName {
get {
return ViewState.GetString ("CommandName", "");
}
[WebCategory ("Appearance")]
#if NET_2_0
[Localizable (true)]
- public virtual
-#else
- public
#endif
- string Text {
+ public string Text {
get {
return ViewState.GetString ("Text", "");
}
writer.AddAttribute (HtmlTextWriterAttribute.Value, Text);
if (CausesValidation && Page != null && Page.AreValidatorsUplevel ()) {
+ string onclick = Attributes["onclick"];
+ if (onclick != null) {
+ Attributes.Remove("onclick");
+ int len = onclick.Length;
+ if (len > 0 && onclick[len - 1] != ';')
+ onclick += ";";
+ }
ClientScriptManager csm = new ClientScriptManager (Page);
- writer.AddAttribute (HtmlTextWriterAttribute.Onclick, csm.GetClientValidationEvent ());
+ writer.AddAttribute (HtmlTextWriterAttribute.Onclick, onclick + csm.GetClientValidationEvent ());
writer.AddAttribute ("language", "javascript");
}
void IPostBackEventHandler.RaisePostBackEvent (string eventArgument)
{
- if (CausesValidation)
-#if NET_2_0
- Page.Validate (ValidationGroup);
-#else
- Page.Validate ();
-#endif
-
- OnClick (EventArgs.Empty);
- OnCommand (new CommandEventArgs (CommandName, CommandArgument));
+ RaisePostBackEvent (eventArgument);
}
protected virtual void OnClick (EventArgs e)
RaiseBubbleEvent (this, e);
}
-#if NET_2_0
- [MonoTODO]
- protected virtual void RaisePostBackEvent (string eventArgument)
+#if NET_2_0
+ protected virtual
+#endif
+ void RaisePostBackEvent (string eventArgument)
{
- throw new NotImplementedException ();
+ if (CausesValidation)
+#if NET_2_0
+ Page.Validate (ValidationGroup);
+#else
+ Page.Validate ();
+#endif
+
+ OnClick (EventArgs.Empty);
+ OnCommand (new CommandEventArgs (CommandName, CommandArgument));
}
-#endif
- [MonoTODO ("why is this here?")]
#if NET_2_0
protected internal
#else
#endif
override void RenderContents (HtmlTextWriter writer)
{
- base.RenderContents (writer);
}
[WebSysDescription ("")]
[Themeable (false)]
[UrlProperty("*.aspx")]
[MonoTODO]
- public string PostBackUrl {
+ public virtual string PostBackUrl {
get {
- throw new NotImplementedException ();
+ return ViewState.GetString ("PostBackUrl", "");
}
set {
- throw new NotImplementedException ();
+ ViewState ["PostBackUrl"] = value;
}
}
[Themeable (false)]
[WebSysDescription ("")]
[WebCategoryAttribute ("Behavior")]
- public string ValidationGroup {
+ public virtual string ValidationGroup {
get {
return ViewState.GetString ("ValidationGroup", "");
}
}
}
+