Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebControls / FormParameter.cs / 1305376 / FormParameter.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls { using System; using System.ComponentModel; using System.Data; ////// Represents a Parameter that gets its value from the application's form parameters. /// [ DefaultProperty("FormField"), ] 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 internal 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; ////// Represents a Parameter that gets its value from the application's form parameters. /// [ DefaultProperty("FormField"), ] 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 internal 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
- ExtendedPropertiesHandler.cs
- AddingNewEventArgs.cs
- DataObjectAttribute.cs
- WCFBuildProvider.cs
- HttpProfileGroupBase.cs
- MailBnfHelper.cs
- DocumentReferenceCollection.cs
- ToolStripGripRenderEventArgs.cs
- SafeEventLogReadHandle.cs
- WebBrowserNavigatedEventHandler.cs
- XmlText.cs
- DiscoveryClientProtocol.cs
- PolyLineSegment.cs
- PagedControl.cs
- HttpApplicationFactory.cs
- PrintSchema.cs
- WebPartsSection.cs
- TdsParameterSetter.cs
- ExtendedTransformFactory.cs
- XDRSchema.cs
- HtmlInputImage.cs
- BufferModesCollection.cs
- XamlSerializationHelper.cs
- HttpCacheParams.cs
- XmlSchemaAttributeGroup.cs
- PersonalizationDictionary.cs
- DataControlFieldHeaderCell.cs
- GroupItem.cs
- AppDomainAttributes.cs
- StringUtil.cs
- IdentityModelStringsVersion1.cs
- SpecialTypeDataContract.cs
- HttpStreamXmlDictionaryWriter.cs
- SqlClientWrapperSmiStream.cs
- DataAdapter.cs
- MdImport.cs
- KeyMatchBuilder.cs
- SqlMethodTransformer.cs
- HMACSHA384.cs
- TextServicesCompartment.cs
- SQLSingleStorage.cs
- SqlCacheDependency.cs
- ErrorFormatter.cs
- ExpressionBuilderCollection.cs
- DoubleLinkListEnumerator.cs
- ScrollEventArgs.cs
- DataStreamFromComStream.cs
- CommandBinding.cs
- VectorCollectionConverter.cs
- Transactions.cs
- SqlTypesSchemaImporter.cs
- ProcessHostConfigUtils.cs
- FileSystemInfo.cs
- LogLogRecordEnumerator.cs
- UrlAuthFailureHandler.cs
- ProcessModuleCollection.cs
- DirectoryNotFoundException.cs
- unitconverter.cs
- PreProcessor.cs
- ContentType.cs
- COM2TypeInfoProcessor.cs
- TraceSection.cs
- RequestCacheValidator.cs
- MachineSettingsSection.cs
- CompiledQueryCacheEntry.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- PenCursorManager.cs
- PaperSource.cs
- InlinedLocationReference.cs
- TreeNode.cs
- SerializationAttributes.cs
- JsonClassDataContract.cs
- AcceleratedTokenAuthenticator.cs
- PersonalizableTypeEntry.cs
- HebrewCalendar.cs
- SByteConverter.cs
- CharAnimationBase.cs
- EFAssociationProvider.cs
- ZipPackage.cs
- LinqDataSourceView.cs
- SafeUserTokenHandle.cs
- TypeConstant.cs
- IntegerValidator.cs
- BitConverter.cs
- PerfService.cs
- X509ChainPolicy.cs
- DrawingDrawingContext.cs
- TextServicesDisplayAttribute.cs
- DecoratedNameAttribute.cs
- AnimationLayer.cs
- DataGridColumnCollection.cs
- CookieHandler.cs
- X509WindowsSecurityToken.cs
- DbDeleteCommandTree.cs
- FileController.cs
- SystemIcons.cs
- WmiPutTraceRecord.cs
- SHA512.cs
- IdnMapping.cs
- SwitchAttribute.cs