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 / QueryStringParameter.cs / 1 / QueryStringParameter.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 QueryString parameters. /// [ DefaultProperty("QueryStringField"), ] [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] public class QueryStringParameter : Parameter { ////// Creates an instance of the QueryStringParameter class. /// public QueryStringParameter() { } ////// Creates an instance of the QueryStringParameter class with the specified parameter name and QueryString field. /// public QueryStringParameter(string name, string queryStringField) : base(name) { QueryStringField = queryStringField; } ////// Creates an instance of the QueryStringParameter class with the specified parameter name, database type, /// and QueryString field. /// public QueryStringParameter(string name, DbType dbType, string queryStringField) : base(name, dbType) { QueryStringField = queryStringField; } ////// Creates an instance of the QueryStringParameter class with the specified parameter name, type, and QueryString field. /// public QueryStringParameter(string name, TypeCode type, string queryStringField) : base(name, type) { QueryStringField = queryStringField; } ////// Used to clone a parameter. /// protected QueryStringParameter(QueryStringParameter original) : base(original) { QueryStringField = original.QueryStringField; } ////// The name of the QueryString parameter to get the value from. /// [ DefaultValue(""), WebCategory("Parameter"), WebSysDescription(SR.QueryStringParameter_QueryStringField), ] public string QueryStringField { get { object o = ViewState["QueryStringField"]; if (o == null) return String.Empty; return (string)o; } set { if (QueryStringField != value) { ViewState["QueryStringField"] = value; OnParameterChanged(); } } } ////// Creates a new QueryStringParameter that is a copy of this QueryStringParameter. /// protected override Parameter Clone() { return new QueryStringParameter(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.QueryString[QueryStringField]; } } } // 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 QueryString parameters. /// [ DefaultProperty("QueryStringField"), ] [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] public class QueryStringParameter : Parameter { ////// Creates an instance of the QueryStringParameter class. /// public QueryStringParameter() { } ////// Creates an instance of the QueryStringParameter class with the specified parameter name and QueryString field. /// public QueryStringParameter(string name, string queryStringField) : base(name) { QueryStringField = queryStringField; } ////// Creates an instance of the QueryStringParameter class with the specified parameter name, database type, /// and QueryString field. /// public QueryStringParameter(string name, DbType dbType, string queryStringField) : base(name, dbType) { QueryStringField = queryStringField; } ////// Creates an instance of the QueryStringParameter class with the specified parameter name, type, and QueryString field. /// public QueryStringParameter(string name, TypeCode type, string queryStringField) : base(name, type) { QueryStringField = queryStringField; } ////// Used to clone a parameter. /// protected QueryStringParameter(QueryStringParameter original) : base(original) { QueryStringField = original.QueryStringField; } ////// The name of the QueryString parameter to get the value from. /// [ DefaultValue(""), WebCategory("Parameter"), WebSysDescription(SR.QueryStringParameter_QueryStringField), ] public string QueryStringField { get { object o = ViewState["QueryStringField"]; if (o == null) return String.Empty; return (string)o; } set { if (QueryStringField != value) { ViewState["QueryStringField"] = value; OnParameterChanged(); } } } ////// Creates a new QueryStringParameter that is a copy of this QueryStringParameter. /// protected override Parameter Clone() { return new QueryStringParameter(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.QueryString[QueryStringField]; } } } // 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
- TrustSection.cs
- SynchronizedInputHelper.cs
- ThumbButtonInfo.cs
- RNGCryptoServiceProvider.cs
- ForceCopyBuildProvider.cs
- BrowserCapabilitiesFactoryBase.cs
- RectangleHotSpot.cs
- nulltextcontainer.cs
- MemoryFailPoint.cs
- WebPartConnectionsCancelVerb.cs
- MsmqHostedTransportConfiguration.cs
- GPRECTF.cs
- QuotedPrintableStream.cs
- QueryStatement.cs
- DataGridViewCellMouseEventArgs.cs
- TreeNode.cs
- TypeDelegator.cs
- EdmEntityTypeAttribute.cs
- RuntimeEnvironment.cs
- CroppedBitmap.cs
- ListItem.cs
- LockRecursionException.cs
- XdrBuilder.cs
- CompilerInfo.cs
- DecimalConverter.cs
- VirtualDirectoryMapping.cs
- MouseGesture.cs
- BitmapCacheBrush.cs
- FormsAuthenticationEventArgs.cs
- RequestResizeEvent.cs
- Style.cs
- AtomicFile.cs
- LogEntryHeaderSerializer.cs
- EntityClassGenerator.cs
- URIFormatException.cs
- WindowsToolbarAsMenu.cs
- CollectionViewProxy.cs
- OutputCacheProviderCollection.cs
- FixedSOMTableCell.cs
- Identifier.cs
- SafeMemoryMappedFileHandle.cs
- StringFreezingAttribute.cs
- DispatcherHookEventArgs.cs
- GlyphElement.cs
- ILGenerator.cs
- AbstractSvcMapFileLoader.cs
- ItemChangedEventArgs.cs
- MediaSystem.cs
- SourceFileBuildProvider.cs
- JoinCqlBlock.cs
- COM2EnumConverter.cs
- SrgsItemList.cs
- ProjectionPlanCompiler.cs
- IBuiltInEvidence.cs
- TableLayoutSettingsTypeConverter.cs
- HwndSubclass.cs
- GridViewRowPresenter.cs
- XpsStructure.cs
- RequestCacheEntry.cs
- AnimationStorage.cs
- EventLogPermissionAttribute.cs
- StorageInfo.cs
- DictionaryGlobals.cs
- Pkcs9Attribute.cs
- DynamicQueryStringParameter.cs
- Wildcard.cs
- GeneralTransform3DGroup.cs
- FixedFlowMap.cs
- SqlDataSourceStatusEventArgs.cs
- __FastResourceComparer.cs
- EventLogEntryCollection.cs
- XmlBindingWorker.cs
- ExceptionRoutedEventArgs.cs
- SolidColorBrush.cs
- MarginCollapsingState.cs
- ProviderConnectionPointCollection.cs
- FocusChangedEventArgs.cs
- DoubleMinMaxAggregationOperator.cs
- SchemaCollectionPreprocessor.cs
- FloatMinMaxAggregationOperator.cs
- XsdDateTime.cs
- WebPartConnectionsCloseVerb.cs
- Opcode.cs
- CustomAttributeFormatException.cs
- StylusPointProperty.cs
- MenuItemStyle.cs
- safex509handles.cs
- MimeTypePropertyAttribute.cs
- Point4D.cs
- XPathParser.cs
- GroupBox.cs
- HostedTransportConfigurationManager.cs
- TimeoutException.cs
- SafeRightsManagementPubHandle.cs
- _DynamicWinsockMethods.cs
- ProfileSection.cs
- XmlDownloadManager.cs
- Int32RectValueSerializer.cs
- ExtenderProvidedPropertyAttribute.cs
- SignatureHelper.cs