Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@gnome.org>2005-08-27 00:38:24 +0400
committerMiguel de Icaza <miguel@gnome.org>2005-08-27 00:38:24 +0400
commit4c004f75ed8cc5aed4f5b02eb9430c51aff0f86e (patch)
tree3aef61fcbb044502a0e393603b986fbece1e1057 /mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlInputButton.cs
parent3acf0fed35e1cf8966c3a7bd9cb693d17728b500 (diff)
Remove
svn path=/trunk/mcs/; revision=48909
Diffstat (limited to 'mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlInputButton.cs')
-rw-r--r--mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlInputButton.cs103
1 files changed, 0 insertions, 103 deletions
diff --git a/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlInputButton.cs b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlInputButton.cs
deleted file mode 100644
index 1a962de0cd0..00000000000
--- a/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlInputButton.cs
+++ /dev/null
@@ -1,103 +0,0 @@
-/* System.Web.UI.HtmlControls
-* Authors
-* Leen Toelen (toelen@hotmail.com)
-*/
-
-using System;
-using System.ComponentModel;
-using System.Globalization;
-using System.Web;
-using System.Web.UI;
-
-namespace System.Web.UI.HtmlControls{
-
- [DefaultEvent("ServerClick")]
- public class HtmlInputButton : HtmlInputControl, IPostBackEventHandler{
-
- private static readonly object EventServerClick = new object ();
-
- public HtmlInputButton(): base ("button")
- {
- }
-
- public HtmlInputButton(string type): base(type){}
-
- protected override void OnPreRender (EventArgs e)
- {
- base.OnPreRender(e);
- if (Page != null && Events [EventServerClick] != null)
- Page.RequiresPostBackScript ();
- }
-
- protected override void RenderAttributes (HtmlTextWriter writer)
- {
- if (Page != null && CausesValidation) {
- string type = Type;
- if (String.Compare (type, "button", true) == 0 || String.Compare (type, "submit", true) == 0) {
- string script = Page.ClientScript.GetPostBackClientEvent (this, String.Empty);
- if (script != null &&
- ((String.Compare (type, "button", true) == 0 && Events[EventServerClick] != null )||
- (String.Compare (type, "submit", true) == 0 && Page.Validators.Count > 0))){
- AttributeCollection coll = Attributes;
- if (coll ["language"] != null)
- coll.Remove ("language");
- writer.WriteAttribute ("language", "javascript");
-
- string onclick;
- if ((onclick = coll ["onclick"]) != null) {
- script = onclick + " " + script;
- coll.Remove ("onclick");
- }
-
- writer.WriteAttribute ("onclick", script);
- }
- }
- }
-
- base.RenderAttributes (writer);
- }
-
- protected virtual void OnServerClick(EventArgs e){
- EventHandler handler = (EventHandler) Events[EventServerClick];
- if (handler != null){
- handler (this, e);
- }
- }
-
- void IPostBackEventHandler.RaisePostBackEvent (string eventArgument)
- {
- if(CausesValidation == true){
- Page.Validate();
- }
- OnServerClick(EventArgs.Empty);
- }
-
- [WebCategory("Action")]
- [WebSysDescription("Fires when the control is clicked.")]
- public event EventHandler ServerClick{
- add{
- Events.AddHandler(EventServerClick, value);
- }
- remove{
- Events.RemoveHandler(EventServerClick, value);
- }
- }
-
- [DefaultValue(true)]
- [WebCategory("Behavior")]
- public bool CausesValidation{
- get{
- object causesVal = ViewState["CausesValidation"];
- if (causesVal != null){
- return (Boolean) causesVal;
- }
- return true;
- }
- set{
- ViewState["CausesValidation"] = (Boolean) value;
- }
- }
-
- } // end of System.Web.UI.HtmlControls.HtmlInputButton
-} // namespace System.Web.UI.HtmlControls
-