Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- _TransmitFileOverlappedAsyncResult.cs
- PassportAuthentication.cs
- StatusBar.cs
- MetadataItem_Static.cs
- _Win32.cs
- ListViewUpdateEventArgs.cs
- NullRuntimeConfig.cs
- ProcessHostMapPath.cs
- ArgumentValidation.cs
- DataGridColumnReorderingEventArgs.cs
- xdrvalidator.cs
- MemberDescriptor.cs
- NamespaceInfo.cs
- ItemMap.cs
- FolderBrowserDialog.cs
- DnsEndPoint.cs
- Evidence.cs
- HostingEnvironmentWrapper.cs
- PauseStoryboard.cs
- Root.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- __ComObject.cs
- PartialArray.cs
- Scene3D.cs
- XmlQueryOutput.cs
- WSTrustDec2005.cs
- DnsEndPoint.cs
- DetailsViewRowCollection.cs
- DockPanel.cs
- KnownBoxes.cs
- Compiler.cs
- WindowsTab.cs
- CodeTypeDeclaration.cs
- ModelItemKeyValuePair.cs
- GorillaCodec.cs
- MgmtConfigurationRecord.cs
- FilterableAttribute.cs
- RegistrySecurity.cs
- XamlInt32CollectionSerializer.cs
- EncryptedKey.cs
- WindowHideOrCloseTracker.cs
- BamlRecordWriter.cs
- PropertyPath.cs
- Pens.cs
- UserControl.cs
- ImageKeyConverter.cs
- CultureData.cs
- CustomSignedXml.cs
- CacheOutputQuery.cs
- TypeGeneratedEventArgs.cs
- DataGridViewSelectedCellCollection.cs
- GradientPanel.cs
- TemplateInstanceAttribute.cs
- Attributes.cs
- HtmlHistory.cs
- ADRoleFactory.cs
- XmlDataDocument.cs
- Package.cs
- ControlPropertyNameConverter.cs
- StringFreezingAttribute.cs
- IisHelper.cs
- X509IssuerSerialKeyIdentifierClause.cs
- latinshape.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- StackOverflowException.cs
- CommandExpr.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- WrappedIUnknown.cs
- TwoPhaseCommit.cs
- DateTimeConverter.cs
- OptimizedTemplateContentHelper.cs
- RegistryPermission.cs
- MsmqIntegrationElement.cs
- BroadcastEventHelper.cs
- XPathAxisIterator.cs
- RightsManagementInformation.cs
- HMACMD5.cs
- BuildProviderAppliesToAttribute.cs
- WindowsFormsHostAutomationPeer.cs
- MapPathBasedVirtualPathProvider.cs
- ProtocolViolationException.cs
- TextUtf8RawTextWriter.cs
- NetworkCredential.cs
- BitmapCodecInfo.cs
- RequestCache.cs
- CodeDirectionExpression.cs
- MemberHolder.cs
- CommonProperties.cs
- basevalidator.cs
- SoapRpcServiceAttribute.cs
- GenericAuthenticationEventArgs.cs
- DataGridViewCellStyleConverter.cs
- HtmlCalendarAdapter.cs
- DateTimePicker.cs
- CategoryEditor.cs
- CatalogZoneAutoFormat.cs
- CodeDomSerializerBase.cs
- PropVariant.cs
- Mappings.cs
- LayoutInformation.cs