Code:
/ FX-1434 / FX-1434 / 1.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
- PersianCalendar.cs
- FindCriteria11.cs
- MasterPage.cs
- HtmlInputReset.cs
- CompilationPass2Task.cs
- DeviceSpecific.cs
- BoundConstants.cs
- XmlSortKeyAccumulator.cs
- ImageSourceConverter.cs
- PasswordValidationException.cs
- MenuItemBindingCollection.cs
- DataGridViewCheckBoxCell.cs
- ControlCodeDomSerializer.cs
- SqlDataSourceConnectionPanel.cs
- SqlClientFactory.cs
- XmlRawWriterWrapper.cs
- LinkDescriptor.cs
- ExpressionBindingCollection.cs
- FileSystemInfo.cs
- RequestNavigateEventArgs.cs
- PointAnimationClockResource.cs
- XPathItem.cs
- TypeName.cs
- SetterBaseCollection.cs
- PropertyIDSet.cs
- WindowsFormsHost.cs
- SignedPkcs7.cs
- EdmSchemaError.cs
- SrgsElementFactoryCompiler.cs
- SymbolMethod.cs
- Process.cs
- AppDomainGrammarProxy.cs
- HttpApplicationFactory.cs
- LifetimeServices.cs
- GetPageNumberCompletedEventArgs.cs
- HitTestResult.cs
- TouchFrameEventArgs.cs
- UserPreferenceChangedEventArgs.cs
- TypeSystem.cs
- TextBox.cs
- CompatibleComparer.cs
- DocumentSchemaValidator.cs
- ScriptIgnoreAttribute.cs
- WorkflowPrinting.cs
- ServiceHost.cs
- Thickness.cs
- Script.cs
- ButtonChrome.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- StateBag.cs
- RowToParametersTransformer.cs
- ScriptIgnoreAttribute.cs
- DesignTimeDataBinding.cs
- NamespaceImport.cs
- WindowsListBox.cs
- IndicShape.cs
- ReadOnlyObservableCollection.cs
- DBDataPermission.cs
- Subordinate.cs
- Animatable.cs
- ExpressionBuilder.cs
- FormsAuthenticationUser.cs
- ImplicitInputBrush.cs
- ServiceNameElement.cs
- RsaSecurityToken.cs
- SafeCryptoHandles.cs
- COM2ExtendedBrowsingHandler.cs
- RNGCryptoServiceProvider.cs
- DelegateBodyWriter.cs
- ConcurrentStack.cs
- WebConfigurationHost.cs
- SynchronizedDispatch.cs
- FontStretches.cs
- DispatchChannelSink.cs
- GlobalProxySelection.cs
- PixelShader.cs
- _Semaphore.cs
- DependencyObjectProvider.cs
- FontSourceCollection.cs
- XXXInfos.cs
- DropSourceBehavior.cs
- RealProxy.cs
- RuntimeConfig.cs
- RuntimeHelpers.cs
- WizardForm.cs
- ClientScriptManager.cs
- ByteStreamMessageEncodingElement.cs
- ISAPIWorkerRequest.cs
- StreamWithDictionary.cs
- AtomPub10CategoriesDocumentFormatter.cs
- DBAsyncResult.cs
- manifestimages.cs
- Vector3dCollection.cs
- LinkButton.cs
- QilInvokeEarlyBound.cs
- cookie.cs
- FixedPage.cs
- UnmanagedMemoryStream.cs
- DialogResultConverter.cs
- XmlFileEditor.cs