Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / UI / WebControls / ProfileParameter.cs / 1 / ProfileParameter.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls { using System; using System.ComponentModel; using System.Security.Permissions; ////// Represents a Parameter that gets its value from the user's profile data. /// [ DefaultProperty("PropertyName"), ] [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] public class ProfileParameter : Parameter { ////// Creates an instance of the ProfileParameter class. /// public ProfileParameter() { } ////// Creates an instance of the ProfileParameter class with the specified parameter name and profile property. /// public ProfileParameter(string name, string propertyName) : base(name) { PropertyName = propertyName; } ////// Creates an instance of the ProfileParameter class with the specified parameter name, type, and profile property. /// public ProfileParameter(string name, TypeCode type, string propertyName) : base(name, type) { PropertyName = propertyName; } ////// Used to clone a parameter. /// protected ProfileParameter(ProfileParameter original) : base(original) { PropertyName = original.PropertyName; } ////// The name of the Profile property to get the value from. /// [ DefaultValue(""), WebCategory("Parameter"), WebSysDescription(SR.ProfileParameter_PropertyName), ] public string PropertyName { get { object o = ViewState["PropertyName"]; if (o == null) return String.Empty; return (string)o; } set { if (PropertyName != value) { ViewState["PropertyName"] = value; OnParameterChanged(); } } } ////// Creates a new ProfileParameter that is a copy of this ProfileParameter. /// protected override Parameter Clone() { return new ProfileParameter(this); } ////// Returns the updated value of the parameter. /// protected override object Evaluate(HttpContext context, Control control) { if (context == null || context.Profile == null) { return null; } return DataBinder.Eval(context.Profile, PropertyName); } } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- QilNode.cs
- ListBox.cs
- UserPreference.cs
- CacheHelper.cs
- RSAOAEPKeyExchangeDeformatter.cs
- DataGridViewRowContextMenuStripNeededEventArgs.cs
- SchemaInfo.cs
- DeclarativeConditionsCollection.cs
- TdsParserStateObject.cs
- IList.cs
- ArrayList.cs
- DataGridRow.cs
- SelectionItemPattern.cs
- TTSEngineProxy.cs
- EventItfInfo.cs
- Padding.cs
- DBCommandBuilder.cs
- EventLogSession.cs
- ByteKeyFrameCollection.cs
- RepeatBehavior.cs
- PlatformCulture.cs
- _HeaderInfo.cs
- securitycriticaldataClass.cs
- ErrorTableItemStyle.cs
- ColumnReorderedEventArgs.cs
- LinearQuaternionKeyFrame.cs
- TableLayout.cs
- TransformConverter.cs
- VariantWrapper.cs
- _SslStream.cs
- RankException.cs
- CompilationUnit.cs
- DataSourceConverter.cs
- ForceCopyBuildProvider.cs
- BevelBitmapEffect.cs
- __ConsoleStream.cs
- ValidationPropertyAttribute.cs
- DataGridTablesFactory.cs
- EmbossBitmapEffect.cs
- MultiBinding.cs
- HealthMonitoringSection.cs
- embossbitmapeffect.cs
- Vars.cs
- EncoderNLS.cs
- BroadcastEventHelper.cs
- DateBoldEvent.cs
- FaultContext.cs
- ErrorStyle.cs
- ExtenderProvidedPropertyAttribute.cs
- Boolean.cs
- IOException.cs
- FormDesigner.cs
- ClientUrlResolverWrapper.cs
- HashAlgorithm.cs
- ScrollPatternIdentifiers.cs
- NextPreviousPagerField.cs
- WebPartTransformerCollection.cs
- ColorKeyFrameCollection.cs
- VoiceObjectToken.cs
- LocalizabilityAttribute.cs
- SystemBrushes.cs
- TPLETWProvider.cs
- webbrowsersite.cs
- IconBitmapDecoder.cs
- DiscoveryServerProtocol.cs
- TypeConverterAttribute.cs
- XComponentModel.cs
- RegionData.cs
- shaperfactoryquerycacheentry.cs
- NameObjectCollectionBase.cs
- HttpCookie.cs
- AutomationTextAttribute.cs
- ToolStripSystemRenderer.cs
- TreeNodeStyleCollection.cs
- LicenseProviderAttribute.cs
- TrustSection.cs
- BamlLocalizableResource.cs
- HtmlInputControl.cs
- PackWebRequestFactory.cs
- ValidatorUtils.cs
- QueryExpression.cs
- CharUnicodeInfo.cs
- ResourceAssociationSetEnd.cs
- ValueQuery.cs
- CompilerErrorCollection.cs
- ShutDownListener.cs
- FacetDescription.cs
- EdmType.cs
- PathSegmentCollection.cs
- UdpMessageProperty.cs
- SatelliteContractVersionAttribute.cs
- PerfCounters.cs
- LoadMessageLogger.cs
- StandardTransformFactory.cs
- HttpWriter.cs
- LongCountAggregationOperator.cs
- WebZone.cs
- Image.cs
- EncodingNLS.cs
- _NetworkingPerfCounters.cs