Files
mono/mcs/class/System.Web/System.Web.UI/DesignerDataBoundLiteralControl.cs
T
Andreas N 861cc74227 2003-07-30 Andreas Nahr <[email protected]>
* UserControl.cs: Added attribute
	* BasePartialCachingControl.cs: New class and paritally implemented
	* DesignerDataBoundLiteralControl.cs: New class and implemented
	* DesignTimeTemplateParser.cs:
	* PartialCachingControl.cs:
	* StaticPartialCachingControl.cs: New class and paritally implemented

svn path=/trunk/mcs/; revision=16883
2003-07-30 13:56:03 +00:00

58 lines
1.1 KiB
C#

//
// System.Web.UI.DesignerDataBoundLiteralControl.cs
//
// Author:
// Andreas Nahr ([email protected])
//
// (C) 2003 Andreas Nahr
//
using System;
using System.ComponentModel;
namespace System.Web.UI
{
[ToolboxItem(false)]
[DataBindingHandler ("System.Web.UI.Design.TextDataBindingHandler, " + Consts.AssemblySystem_Design)]
public sealed class DesignerDataBoundLiteralControl : Control
{
private string text = "";
public DesignerDataBoundLiteralControl ()
{
base.PreventAutoID ();
}
public string Text {
get { return text;}
set {
if (value == null)
text = string.Empty;
else
text = value;
}
}
protected override ControlCollection CreateControlCollection ()
{
return new EmptyControlCollection (this);
}
protected override void LoadViewState (object savedState)
{
if (savedState != null)
text = (string) savedState;
}
protected override void Render (HtmlTextWriter output)
{
output.Write (text);
}
protected override object SaveViewState ()
{
return text;
}
}
}