Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WebBrowserUriTypeConverter.cs
- CriticalHandle.cs
- StrongTypingException.cs
- FileSecurity.cs
- IisNotInstalledException.cs
- DataGridCellItemAutomationPeer.cs
- SuppressIldasmAttribute.cs
- HwndProxyElementProvider.cs
- EndpointAddressAugust2004.cs
- Light.cs
- ProcessExitedException.cs
- CompiledQuery.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- RegexFCD.cs
- ViewStateModeByIdAttribute.cs
- VBCodeProvider.cs
- LocationUpdates.cs
- QueryResponse.cs
- RegexCaptureCollection.cs
- TreeBuilderXamlTranslator.cs
- VersionedStreamOwner.cs
- _HeaderInfoTable.cs
- UpdateException.cs
- SafeNativeMethodsCLR.cs
- TypeConverterHelper.cs
- PropertyInformation.cs
- LogWriteRestartAreaState.cs
- MatrixAnimationUsingKeyFrames.cs
- RangeContentEnumerator.cs
- RuntimeVariablesExpression.cs
- XMLSyntaxException.cs
- SqlParameter.cs
- Point4D.cs
- AnnotationComponentChooser.cs
- formatter.cs
- ChildrenQuery.cs
- OpenTypeCommon.cs
- LogExtent.cs
- PathFigure.cs
- PeerNameRecord.cs
- CompositeCollectionView.cs
- SectionInput.cs
- CodeDOMUtility.cs
- SafeHandles.cs
- SQLInt64.cs
- OleAutBinder.cs
- XmlSchemaAny.cs
- InterleavedZipPartStream.cs
- CultureMapper.cs
- ResourceReferenceExpressionConverter.cs
- MarkerProperties.cs
- XamlWrappingReader.cs
- EntityDataSourceDesigner.cs
- ISFClipboardData.cs
- IssuedTokenParametersEndpointAddressElement.cs
- Menu.cs
- SequentialUshortCollection.cs
- Scheduling.cs
- StringUtil.cs
- SchemaTableColumn.cs
- AppSettingsExpressionBuilder.cs
- XsltFunctions.cs
- ByteConverter.cs
- DecoderFallback.cs
- smtppermission.cs
- RuleAction.cs
- FixedDocument.cs
- DataPagerFieldCollection.cs
- PropertyPathConverter.cs
- TextParentUndoUnit.cs
- DataGridViewAdvancedBorderStyle.cs
- DocumentApplicationJournalEntry.cs
- ColumnResizeUndoUnit.cs
- DiagnosticTraceSource.cs
- PositiveTimeSpanValidatorAttribute.cs
- SQLBinaryStorage.cs
- Latin1Encoding.cs
- DoubleCollectionConverter.cs
- UIElement3D.cs
- DataSourceControlBuilder.cs
- HierarchicalDataBoundControlAdapter.cs
- DependencyPropertyDescriptor.cs
- MgmtResManager.cs
- SourceItem.cs
- SmtpNtlmAuthenticationModule.cs
- InputMethod.cs
- XmlSchema.cs
- TableHeaderCell.cs
- latinshape.cs
- MatrixValueSerializer.cs
- EdmItemCollection.cs
- DataSysAttribute.cs
- SQLString.cs
- XmlSecureResolver.cs
- EventToken.cs
- Size3DValueSerializer.cs
- XmlHierarchicalDataSourceView.cs
- FrameworkReadOnlyPropertyMetadata.cs
- BatchParser.cs
- Transform3DCollection.cs