Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / xsp / System / Web / UI / WebControls / FormParameter.cs / 1 / 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
- TextDecorations.cs
- KeyedCollection.cs
- ping.cs
- Parallel.cs
- StaticTextPointer.cs
- StylusPoint.cs
- TextBoxAutoCompleteSourceConverter.cs
- Range.cs
- OdbcPermission.cs
- TypeBuilder.cs
- BaseAddressElement.cs
- UnsafeNativeMethods.cs
- NamespaceMapping.cs
- StrongNameSignatureInformation.cs
- UncommonField.cs
- InkCanvasInnerCanvas.cs
- remotingproxy.cs
- EventSourceCreationData.cs
- CacheMemory.cs
- OledbConnectionStringbuilder.cs
- HexParser.cs
- TagNameToTypeMapper.cs
- URLIdentityPermission.cs
- WindowsSecurityTokenAuthenticator.cs
- DataGridRelationshipRow.cs
- RelationshipEnd.cs
- PrinterResolution.cs
- MemoryFailPoint.cs
- keycontainerpermission.cs
- ValueUnavailableException.cs
- mansign.cs
- SolidBrush.cs
- Binding.cs
- DataSet.cs
- ByteStreamMessageEncoderFactory.cs
- BevelBitmapEffect.cs
- ValueExpressions.cs
- SafeWaitHandle.cs
- _BasicClient.cs
- MailDefinition.cs
- GuidConverter.cs
- AuthenticationConfig.cs
- OdbcStatementHandle.cs
- SafeFindHandle.cs
- InvalidDataException.cs
- DetailsViewPagerRow.cs
- PreloadedPackages.cs
- ThemeInfoAttribute.cs
- PeerReferralPolicy.cs
- OdbcConnectionFactory.cs
- UnescapedXmlDiagnosticData.cs
- StylusPointProperty.cs
- SQLMembershipProvider.cs
- SchemaImporterExtension.cs
- TemplateControlParser.cs
- WebConfigurationFileMap.cs
- GeneralTransform3DTo2D.cs
- CategoryAttribute.cs
- InvariantComparer.cs
- EpmAttributeNameBuilder.cs
- ExtensionDataObject.cs
- __ConsoleStream.cs
- CodeEntryPointMethod.cs
- ScrollBarAutomationPeer.cs
- UserNameServiceElement.cs
- CodeParameterDeclarationExpressionCollection.cs
- ActivationArguments.cs
- XmlElementAttributes.cs
- ReadOnlyHierarchicalDataSourceView.cs
- SQLMembershipProvider.cs
- DataControlFieldCell.cs
- CounterNameConverter.cs
- NotificationContext.cs
- FormatVersion.cs
- Metadata.cs
- OneOf.cs
- Buffer.cs
- CollectionDataContractAttribute.cs
- SocketInformation.cs
- WindowsPen.cs
- ObjectDataSourceDisposingEventArgs.cs
- XXXInfos.cs
- Transform3D.cs
- SystemIPAddressInformation.cs
- Transactions.cs
- LocalizabilityAttribute.cs
- ChannelManagerHelpers.cs
- FileUtil.cs
- ProtectedProviderSettings.cs
- MouseGestureConverter.cs
- HorizontalAlignConverter.cs
- CommunicationException.cs
- CodeSnippetExpression.cs
- AssemblyResourceLoader.cs
- SocketInformation.cs
- Content.cs
- ProvidersHelper.cs
- GenericUI.cs
- TextParaLineResult.cs
- TextDecoration.cs