blob: dd3990bab10acdcb48cfbe0614f3e7969d49d790 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
//
// System.Web.UI.DesignerDataBoundLiteralControl.cs
//
// Author:
// Andreas Nahr (ClassDevelopment@A-SoftTech.com)
//
// (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;
}
}
}
|