Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / xsp / System / Web / UI / WebControls / AutoGeneratedFieldProperties.cs / 1 / AutoGeneratedFieldProperties.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.UI.WebControls {
using System;
using System.ComponentModel;
using System.Reflection;
using System.Security.Permissions;
using System.Web.Util;
///
///
/// Stores the properties for an AutoGeneratedField.
///
///
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
public sealed class AutoGeneratedFieldProperties : IStateManager {
private bool _isTracking;
private StateBag _statebag;
public AutoGeneratedFieldProperties() {
_statebag = new StateBag();
}
public string DataField {
get {
object o = ViewState["DataField"];
if (o != null) {
return (string)o;
}
return String.Empty;
}
set {
ViewState["DataField"] = value;
}
}
public bool IsReadOnly {
get {
object o = ViewState["IsReadOnly"];
if (o != null) {
return (bool)o;
}
return false;
}
set {
ViewState["IsReadOnly"] = value;
}
}
public string Name {
get {
object o = ViewState["Name"];
if (o != null) {
return (string)o;
}
return String.Empty;
}
set {
ViewState["Name"] = value;
}
}
public Type Type {
get {
object o = ViewState["Type"];
if (o != null) {
return (Type)o;
}
return null;
}
set {
ViewState["Type"] = value;
}
}
///
/// Gets the statebag for the AutoGeneratedFieldProperties. This property is read-only.
///
private StateBag ViewState {
get {
return _statebag;
}
}
#region IStateManager implementation
///
bool IStateManager.IsTrackingViewState {
get {
return _isTracking;
}
}
///
void IStateManager.LoadViewState(object state) {
if (state != null) {
((IStateManager)ViewState).LoadViewState(state);
}
}
///
object IStateManager.SaveViewState() {
object state = ((IStateManager)ViewState).SaveViewState();
return state;
}
///
void IStateManager.TrackViewState() {
_isTracking = true;
ViewState.TrackViewState();
}
#endregion
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.UI.WebControls {
using System;
using System.ComponentModel;
using System.Reflection;
using System.Security.Permissions;
using System.Web.Util;
///
///
/// Stores the properties for an AutoGeneratedField.
///
///
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
public sealed class AutoGeneratedFieldProperties : IStateManager {
private bool _isTracking;
private StateBag _statebag;
public AutoGeneratedFieldProperties() {
_statebag = new StateBag();
}
public string DataField {
get {
object o = ViewState["DataField"];
if (o != null) {
return (string)o;
}
return String.Empty;
}
set {
ViewState["DataField"] = value;
}
}
public bool IsReadOnly {
get {
object o = ViewState["IsReadOnly"];
if (o != null) {
return (bool)o;
}
return false;
}
set {
ViewState["IsReadOnly"] = value;
}
}
public string Name {
get {
object o = ViewState["Name"];
if (o != null) {
return (string)o;
}
return String.Empty;
}
set {
ViewState["Name"] = value;
}
}
public Type Type {
get {
object o = ViewState["Type"];
if (o != null) {
return (Type)o;
}
return null;
}
set {
ViewState["Type"] = value;
}
}
///
/// Gets the statebag for the AutoGeneratedFieldProperties. This property is read-only.
///
private StateBag ViewState {
get {
return _statebag;
}
}
#region IStateManager implementation
///
bool IStateManager.IsTrackingViewState {
get {
return _isTracking;
}
}
///
void IStateManager.LoadViewState(object state) {
if (state != null) {
((IStateManager)ViewState).LoadViewState(state);
}
}
///
object IStateManager.SaveViewState() {
object state = ((IStateManager)ViewState).SaveViewState();
return state;
}
///
void IStateManager.TrackViewState() {
_isTracking = true;
ViewState.TrackViewState();
}
#endregion
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PointAnimation.cs
- RedistVersionInfo.cs
- CapiHashAlgorithm.cs
- RefExpr.cs
- MatrixTransform.cs
- MarkupExtensionReturnTypeAttribute.cs
- InProcStateClientManager.cs
- PersistenceContext.cs
- TextDecorations.cs
- InvokeMethodActivity.cs
- SerialPort.cs
- IndexedString.cs
- TcpClientChannel.cs
- SchemaDeclBase.cs
- HttpListenerResponse.cs
- FixedSOMPage.cs
- SecurityTokenAuthenticator.cs
- basevalidator.cs
- TagMapInfo.cs
- XPathCompileException.cs
- VectorCollectionConverter.cs
- ValidationSettings.cs
- Message.cs
- SqlDataReaderSmi.cs
- WriterOutput.cs
- OleDbPropertySetGuid.cs
- ImportCatalogPart.cs
- AttachInfo.cs
- LogExtentCollection.cs
- RewritingValidator.cs
- TextView.cs
- DataGridRowAutomationPeer.cs
- InternalConfigHost.cs
- Dump.cs
- ControlCommandSet.cs
- DataBindingList.cs
- SystemIPv6InterfaceProperties.cs
- URLMembershipCondition.cs
- AQNBuilder.cs
- DataView.cs
- TokenBasedSetEnumerator.cs
- Timer.cs
- NumericExpr.cs
- RegistryKey.cs
- WindowsFormsHost.cs
- HttpChannelListener.cs
- XPathDocument.cs
- PenThread.cs
- SortedSetDebugView.cs
- Int32Converter.cs
- RtfNavigator.cs
- ProviderUtil.cs
- CompoundFileStorageReference.cs
- ProjectionPathSegment.cs
- ValueSerializerAttribute.cs
- SqlHelper.cs
- SafeBitVector32.cs
- FormViewPageEventArgs.cs
- PointCollectionConverter.cs
- CompModSwitches.cs
- PropertyIDSet.cs
- OuterGlowBitmapEffect.cs
- MultiplexingFormatMapping.cs
- CompositeDataBoundControl.cs
- ResourceReader.cs
- DateTime.cs
- TabItemWrapperAutomationPeer.cs
- DesignBindingPropertyDescriptor.cs
- SessionState.cs
- RpcCryptoRequest.cs
- XDRSchema.cs
- PlanCompilerUtil.cs
- messageonlyhwndwrapper.cs
- XmlParserContext.cs
- UpWmlPageAdapter.cs
- SynchronizingStream.cs
- SystemEvents.cs
- ThumbAutomationPeer.cs
- GridViewRow.cs
- HtmlWindow.cs
- FacetEnabledSchemaElement.cs
- DesignerVerbCollection.cs
- TaiwanLunisolarCalendar.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- DataExpression.cs
- ServiceObjectContainer.cs
- AdornerPresentationContext.cs
- TableItemStyle.cs
- CollectionBase.cs
- Span.cs
- GridItemCollection.cs
- COM2PictureConverter.cs
- MergeFailedEvent.cs
- NonBatchDirectoryCompiler.cs
- CategoryGridEntry.cs
- PersonalizationProviderHelper.cs
- EventSourceCreationData.cs
- Panel.cs
- HtmlContainerControl.cs
- WebPartExportVerb.cs