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:
Diffstat (limited to 'mcs/class/System.Web/System.Web.UI/LiteralControl.cs')
-rw-r--r--mcs/class/System.Web/System.Web.UI/LiteralControl.cs96
1 files changed, 46 insertions, 50 deletions
diff --git a/mcs/class/System.Web/System.Web.UI/LiteralControl.cs b/mcs/class/System.Web/System.Web.UI/LiteralControl.cs
index 93002f71467..9d469ee5f10 100644
--- a/mcs/class/System.Web/System.Web.UI/LiteralControl.cs
+++ b/mcs/class/System.Web/System.Web.UI/LiteralControl.cs
@@ -1,13 +1,11 @@
-//
-// System.Web.UI.LiteralControl.cs
-//
-// Author:
-// Bob Smith <bob@thestuff.net>
-// Gonzalo Paniagua Javier (gonzalo@ximian.com)
-//
-// (C) Bob Smith
-// Copyright (c) 2002-2004 Novell, Inc. (http://www.novell.com)
-//
+//
+// System.Web.UI.LiteralControl.cs
+//
+// Author:
+// Bob Smith <bob@thestuff.net>
+//
+// (C) Bob Smith
+//
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -29,43 +27,41 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-
-using System;
-using System.ComponentModel;
-using System.Web;
-
-namespace System.Web.UI
-{
- [ToolboxItem(false)]
- public class LiteralControl : Control
- {
- string _text;
-
- public LiteralControl () : this (null) {}
-
- public LiteralControl (string text)
- {
- EnableViewState = false;
- PreventAutoID ();
- _text = (text == null) ? "" : text; // Text property is not called for this.
- }
-
- public virtual string Text {
- get { return _text; }
- set {
- _text = (value == null) ? "" : value;
- }
- }
-
- protected override void Render (HtmlTextWriter writer)
- {
- writer.Write (_text);
- }
-
- protected override ControlCollection CreateControlCollection ()
- {
- return new EmptyControlCollection (this);
- }
- }
-}
-
+
+using System;
+using System.ComponentModel;
+using System.Web;
+
+namespace System.Web.UI
+{
+ [ToolboxItem(false)]
+ public class LiteralControl : Control
+ {
+ private string _text = String.Empty;
+ public LiteralControl() {}
+ public LiteralControl(string text)
+ {
+ _text = text;
+ }
+ public virtual string Text
+ {
+ get
+ {
+ return _text;
+ }
+ set
+ {
+ _text = value;
+ }
+ }
+ protected override void Render(HtmlTextWriter writer)
+ {
+ writer.Write(_text);
+ }
+
+ protected override ControlCollection CreateControlCollection ()
+ {
+ return new EmptyControlCollection (this);
+ }
+ }
+}