Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / xsp / System / Web / UI / WebControls / FormParameter.cs / 2 / FormParameter.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls { using System; using System.ComponentModel; using System.Data; using System.Security.Permissions; ////// Represents a Parameter that gets its value from the application's form parameters. /// [ DefaultProperty("FormField"), ] [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] public class FormParameter : Parameter { ////// Creates an instance of the FormParameter class. /// public FormParameter() { } ////// Creates an instance of the FormParameter class with the specified parameter name and form field. /// public FormParameter(string name, string formField) : base(name) { FormField = formField; } ////// Creates an instance of the FormParameter class with the specified parameter name, database type, and /// form field. /// public FormParameter(string name, DbType dbType, string formField) : base(name, dbType) { FormField = formField; } ////// Creates an instance of the FormParameter class with the specified parameter name, type, and form field. /// public FormParameter(string name, TypeCode type, string formField) : base(name, type) { FormField = formField; } ////// Used to clone a parameter. /// protected FormParameter(FormParameter original) : base(original) { FormField = original.FormField; } ////// The name of the form parameter to get the value from. /// [ DefaultValue(""), WebCategory("Parameter"), WebSysDescription(SR.FormParameter_FormField), ] public string FormField { get { object o = ViewState["FormField"]; if (o == null) return String.Empty; return (string)o; } set { if (FormField != value) { ViewState["FormField"] = value; OnParameterChanged(); } } } ////// Creates a new FormParameter that is a copy of this FormParameter. /// protected override Parameter Clone() { return new FormParameter(this); } ////// Returns the updated value of the parameter. /// protected override object Evaluate(HttpContext context, Control control) { if (context == null || context.Request == null) { return null; } return context.Request.Form[FormField]; } } } // 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.Data; using System.Security.Permissions; ////// Represents a Parameter that gets its value from the application's form parameters. /// [ DefaultProperty("FormField"), ] [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] public class FormParameter : Parameter { ////// Creates an instance of the FormParameter class. /// public FormParameter() { } ////// Creates an instance of the FormParameter class with the specified parameter name and form field. /// public FormParameter(string name, string formField) : base(name) { FormField = formField; } ////// Creates an instance of the FormParameter class with the specified parameter name, database type, and /// form field. /// public FormParameter(string name, DbType dbType, string formField) : base(name, dbType) { FormField = formField; } ////// Creates an instance of the FormParameter class with the specified parameter name, type, and form field. /// public FormParameter(string name, TypeCode type, string formField) : base(name, type) { FormField = formField; } ////// Used to clone a parameter. /// protected FormParameter(FormParameter original) : base(original) { FormField = original.FormField; } ////// The name of the form parameter to get the value from. /// [ DefaultValue(""), WebCategory("Parameter"), WebSysDescription(SR.FormParameter_FormField), ] public string FormField { get { object o = ViewState["FormField"]; if (o == null) return String.Empty; return (string)o; } set { if (FormField != value) { ViewState["FormField"] = value; OnParameterChanged(); } } } ////// Creates a new FormParameter that is a copy of this FormParameter. /// protected override Parameter Clone() { return new FormParameter(this); } ////// Returns the updated value of the parameter. /// protected override object Evaluate(HttpContext context, Control control) { if (context == null || context.Request == null) { return null; } return context.Request.Form[FormField]; } } } // 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
- DataTableReader.cs
- XmlSchemaComplexContentExtension.cs
- CachedFontFace.cs
- XPathSelfQuery.cs
- TextWriter.cs
- CodeFieldReferenceExpression.cs
- BasicKeyConstraint.cs
- Grid.cs
- ErrorHandler.cs
- RtfToken.cs
- TextSpan.cs
- DropDownButton.cs
- Point3DCollectionConverter.cs
- MD5.cs
- GenericsInstances.cs
- RecognizerStateChangedEventArgs.cs
- ValueConversionAttribute.cs
- InputElement.cs
- AdornerDecorator.cs
- ManagedFilter.cs
- RunClient.cs
- AccessDataSource.cs
- TableColumn.cs
- SafeRightsManagementPubHandle.cs
- ContentElement.cs
- ConfigurationManagerInternal.cs
- ControlBuilderAttribute.cs
- TimeEnumHelper.cs
- SettingsPropertyCollection.cs
- MultiPartWriter.cs
- CapabilitiesUse.cs
- PngBitmapDecoder.cs
- AccessibleObject.cs
- DataGridViewCheckBoxCell.cs
- PropertyTabChangedEvent.cs
- MenuItemBindingCollection.cs
- HtmlInputReset.cs
- ColorTransformHelper.cs
- SizeChangedEventArgs.cs
- AccessibleObject.cs
- Enlistment.cs
- ApplicationGesture.cs
- Repeater.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- MessageEnumerator.cs
- DataGridPageChangedEventArgs.cs
- FixedSOMImage.cs
- TimelineGroup.cs
- ImpersonateTokenRef.cs
- IdentityVerifier.cs
- PeerNameRegistration.cs
- TrackPoint.cs
- MutableAssemblyCacheEntry.cs
- webbrowsersite.cs
- DefaultWorkflowTransactionService.cs
- AstTree.cs
- EnvironmentPermission.cs
- StructuredType.cs
- ObjectRef.cs
- QilGenerator.cs
- oledbconnectionstring.cs
- InternalConfigEventArgs.cs
- DefinitionUpdate.cs
- NewArrayExpression.cs
- Quaternion.cs
- SymmetricKeyWrap.cs
- HwndSource.cs
- PassportAuthenticationModule.cs
- AttributeSetAction.cs
- ChangeBlockUndoRecord.cs
- VideoDrawing.cs
- Int16.cs
- PageCache.cs
- SignedInfo.cs
- BypassElementCollection.cs
- OdbcUtils.cs
- PropertyTabAttribute.cs
- PeerEndPoint.cs
- SqlParameterCollection.cs
- FixedSOMFixedBlock.cs
- DelegateOutArgument.cs
- UnaryNode.cs
- PropertyGridView.cs
- HMACSHA1.cs
- ToolboxComponentsCreatedEventArgs.cs
- Missing.cs
- WebServiceTypeData.cs
- ObjectCloneHelper.cs
- LocatorPart.cs
- DocumentPageViewAutomationPeer.cs
- Header.cs
- ZipIOExtraField.cs
- PartialCachingControl.cs
- SymmetricKeyWrap.cs
- Int16AnimationBase.cs
- WizardPanel.cs
- AddingNewEventArgs.cs
- AnnotationAuthorChangedEventArgs.cs
- UInt64Converter.cs
- TemplatePropertyEntry.cs