Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / 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. //------------------------------------------------------------------------------ //// 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
- TreeNodeBindingCollection.cs
- TraceXPathNavigator.cs
- Flattener.cs
- ExceptionNotification.cs
- OleAutBinder.cs
- NgenServicingAttributes.cs
- EditorPart.cs
- InplaceBitmapMetadataWriter.cs
- lengthconverter.cs
- IdnElement.cs
- AdapterUtil.cs
- DesignerCommandAdapter.cs
- SafeNativeMethods.cs
- ExpressionBinding.cs
- TabItemWrapperAutomationPeer.cs
- NullableDecimalMinMaxAggregationOperator.cs
- WeakRefEnumerator.cs
- XmlQuerySequence.cs
- DropDownHolder.cs
- AlphaSortedEnumConverter.cs
- SettingsSavedEventArgs.cs
- XmlAggregates.cs
- TextWriter.cs
- HostExecutionContextManager.cs
- WebPartActionVerb.cs
- StructuralCache.cs
- ValidationError.cs
- SelectionRange.cs
- ExpressionBuilder.cs
- WebPartConnectionCollection.cs
- CodeMemberField.cs
- SerializationAttributes.cs
- Object.cs
- MergablePropertyAttribute.cs
- EmptyEnumerable.cs
- WebPartConnectVerb.cs
- InstanceOwnerException.cs
- PaginationProgressEventArgs.cs
- TraceContextEventArgs.cs
- DesignSurfaceManager.cs
- DrawingGroup.cs
- SinglePageViewer.cs
- UpdatePanelTrigger.cs
- LineSegment.cs
- ConnectionPointCookie.cs
- TreeNodeCollection.cs
- DependencyPropertyChangedEventArgs.cs
- externdll.cs
- DictionarySectionHandler.cs
- PropertyRecord.cs
- DataTableReaderListener.cs
- SiteOfOriginPart.cs
- DataList.cs
- AttachedAnnotationChangedEventArgs.cs
- Point3DAnimationBase.cs
- SqlMethodTransformer.cs
- TableLayoutSettings.cs
- DateBoldEvent.cs
- GridSplitterAutomationPeer.cs
- PolicyImporterElement.cs
- HostedImpersonationContext.cs
- ServerValidateEventArgs.cs
- Scheduling.cs
- HostingEnvironmentSection.cs
- CalendarDateRange.cs
- CmsUtils.cs
- IndicCharClassifier.cs
- XmlEventCache.cs
- HWStack.cs
- DeclarationUpdate.cs
- TypeElementCollection.cs
- ItemsChangedEventArgs.cs
- DirtyTextRange.cs
- figurelength.cs
- ThreadAbortException.cs
- ProfileService.cs
- InheritanceService.cs
- KeyValueConfigurationCollection.cs
- MarkupCompilePass2.cs
- MimeBasePart.cs
- FrugalList.cs
- DerivedKeySecurityTokenStub.cs
- OleDbDataReader.cs
- StateRuntime.cs
- TrustManagerMoreInformation.cs
- WebPartConnectionsConfigureVerb.cs
- DataBoundControlHelper.cs
- LineSegment.cs
- EncryptedPackageFilter.cs
- FixedPosition.cs
- HtmlTableRowCollection.cs
- XPathArrayIterator.cs
- DataServiceResponse.cs
- ToolStripDesignerAvailabilityAttribute.cs
- Queue.cs
- ETagAttribute.cs
- SimpleParser.cs
- MappingItemCollection.cs
- MobileTemplatedControlDesigner.cs
- TraceContextEventArgs.cs