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.WebControls/BaseDataList.cs')
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/BaseDataList.cs30
1 files changed, 24 insertions, 6 deletions
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/BaseDataList.cs b/mcs/class/System.Web/System.Web.UI.WebControls/BaseDataList.cs
index 132246f01c4..4f5e814fe88 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/BaseDataList.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/BaseDataList.cs
@@ -65,7 +65,10 @@ namespace System.Web.UI.WebControls {
[WebSysDescription ("")]
[WebCategory ("Accessibility")]
public virtual string Caption {
- get { return ViewState.GetString ("Caption", ""); }
+ get {
+ object o = ViewState ["Caption"];
+ return (o == null) ? String.Empty : (string) o;
+ }
set {
if (value == null)
ViewState.Remove ("Caption");
@@ -76,7 +79,10 @@ namespace System.Web.UI.WebControls {
[DefaultValue (TableCaptionAlign.NotSet)]
public virtual TableCaptionAlign CaptionAlign {
- get { return (TableCaptionAlign) ViewState.GetInt ("CaptionAlign", (int)TableCaptionAlign.NotSet); }
+ get {
+ object o = ViewState ["CaptionAlign"];
+ return (o == null) ? TableCaptionAlign.NotSet : (TableCaptionAlign) o;
+ }
set {
if ((value < TableCaptionAlign.NotSet) || (value > TableCaptionAlign.Right))
throw new ArgumentOutOfRangeException (Locale.GetText ("Invalid TableCaptionAlign value."));
@@ -130,7 +136,10 @@ namespace System.Web.UI.WebControls {
[WebSysDescription("")]
[WebCategory("Data")]
public virtual string DataKeyField {
- get { return ViewState.GetString ("DataKeyField", ""); }
+ get {
+ object o = ViewState ["DataKeyField"];
+ return (o == null) ? String.Empty : (string) o;
+ }
set {
if (value == null)
ViewState.Remove ("DataKeyField");
@@ -169,7 +178,10 @@ namespace System.Web.UI.WebControls {
[WebSysDescription("")]
[WebCategory("Data")]
public string DataMember {
- get { return ViewState.GetString ("DataMember", ""); }
+ get {
+ object o = ViewState ["DataMember"];
+ return (o == null) ? String.Empty : (string) o;
+ }
set {
if (value == null)
ViewState.Remove ("DataMember");
@@ -247,7 +259,10 @@ namespace System.Web.UI.WebControls {
[DefaultValue (false)]
public virtual bool UseAccessibleHeader {
- get { return ViewState.GetBool ("UseAccessibleHeader", false); }
+ get {
+ object o = ViewState ["UseAccessibleHeader"];
+ return (o == null) ? false : (bool) o;
+ }
set { ViewState ["UseAccessibleHeader"] = value; }
}
#if NET_2_0
@@ -255,7 +270,10 @@ namespace System.Web.UI.WebControls {
[IDReferenceProperty (typeof (DataSourceControl))]
[Themeable (false)]
public virtual string DataSourceID {
- get { return ViewState.GetString ("DataSourceID", ""); }
+ get {
+ object o = ViewState ["DataSourceID"];
+ return (o == null) ? String.Empty : (string) o;
+ }
set {
// LAMESPEC ? this is documented as an HttpException in beta2
if (source != null)