Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebControls / QueryStringParameter.cs / 1305376 / QueryStringParameter.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 QueryString parameters. /// [ DefaultProperty("QueryStringField"), ] 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 internal 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; ////// Represents a Parameter that gets its value from the application's QueryString parameters. /// [ DefaultProperty("QueryStringField"), ] 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 internal 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
- PerformanceCounterManager.cs
- SimpleBitVector32.cs
- CryptoApi.cs
- SortableBindingList.cs
- LineSegment.cs
- UserControlCodeDomTreeGenerator.cs
- SiteMapNode.cs
- ScalarOps.cs
- AnnotationObservableCollection.cs
- input.cs
- RC2CryptoServiceProvider.cs
- ViewDesigner.cs
- IndexingContentUnit.cs
- ScrollEventArgs.cs
- SessionPageStatePersister.cs
- StringConcat.cs
- EmissiveMaterial.cs
- XmlUtilWriter.cs
- XmlCDATASection.cs
- CodePrimitiveExpression.cs
- EntityDataSourceChangedEventArgs.cs
- _DisconnectOverlappedAsyncResult.cs
- SBCSCodePageEncoding.cs
- ConsumerConnectionPoint.cs
- SystemGatewayIPAddressInformation.cs
- HttpContext.cs
- _StreamFramer.cs
- SqlBulkCopy.cs
- IndicShape.cs
- COM2PropertyPageUITypeConverter.cs
- OdbcEnvironment.cs
- StringAttributeCollection.cs
- ContentPlaceHolderDesigner.cs
- StylusPlugInCollection.cs
- GeneralTransform.cs
- XhtmlBasicValidatorAdapter.cs
- ManagementPath.cs
- StreamInfo.cs
- PropertyContainer.cs
- NotConverter.cs
- DetailsViewDesigner.cs
- hebrewshape.cs
- GlyphingCache.cs
- InnerItemCollectionView.cs
- RectangleConverter.cs
- SelectionProviderWrapper.cs
- Size3DValueSerializer.cs
- TypeSystem.cs
- ObjectSet.cs
- PTConverter.cs
- RelativeSource.cs
- MessageSecurityProtocol.cs
- MDIControlStrip.cs
- InstanceDescriptor.cs
- AssemblyCache.cs
- ProxyGenerationError.cs
- ExclusiveTcpTransportManager.cs
- Thickness.cs
- EditingMode.cs
- DockPanel.cs
- WebPartsSection.cs
- Button.cs
- InputProviderSite.cs
- ConnectionManagementSection.cs
- wmiprovider.cs
- HttpResponseHeader.cs
- GridViewColumnCollectionChangedEventArgs.cs
- AppDomainShutdownMonitor.cs
- ProcessHostConfigUtils.cs
- SQLRoleProvider.cs
- InkPresenterAutomationPeer.cs
- ComPlusServiceLoader.cs
- FlowDocumentFormatter.cs
- MetadataArtifactLoaderFile.cs
- ControlIdConverter.cs
- RepeatBehaviorConverter.cs
- DatagridviewDisplayedBandsData.cs
- UnSafeCharBuffer.cs
- EntityDataSourceColumn.cs
- AccessDataSourceView.cs
- AspNetSynchronizationContext.cs
- PathSegmentCollection.cs
- SQLDecimal.cs
- DataGridViewColumnHeaderCell.cs
- EventManager.cs
- ItemMap.cs
- CodeDOMProvider.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- ConfigXmlAttribute.cs
- ComPlusTypeLoader.cs
- AssociationSet.cs
- NativeMethods.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- SecurityPolicyVersion.cs
- SqlMethodTransformer.cs
- FacetDescriptionElement.cs
- ProcessModuleCollection.cs
- Span.cs
- ClientCultureInfo.cs
- DataControlPagerLinkButton.cs