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
- CatalogPartChrome.cs
- NavigationCommands.cs
- AdRotatorDesigner.cs
- TraceSwitch.cs
- WebPartUserCapability.cs
- FrameworkElement.cs
- BindingExpressionBase.cs
- WsdlInspector.cs
- AppSettingsReader.cs
- DbConnectionClosed.cs
- SqlProviderServices.cs
- HandlerBase.cs
- infer.cs
- CodeBlockBuilder.cs
- handlecollector.cs
- HtmlLink.cs
- ServiceDescriptionData.cs
- AnnotationHighlightLayer.cs
- ClientSettingsProvider.cs
- FullTrustAssembly.cs
- OSEnvironmentHelper.cs
- CapacityStreamGeometryContext.cs
- Slider.cs
- Identity.cs
- SerializableAttribute.cs
- UnsafePeerToPeerMethods.cs
- X509Certificate2Collection.cs
- FontStretch.cs
- TextureBrush.cs
- ServiceAuthorizationElement.cs
- DataGridViewCellStyleChangedEventArgs.cs
- DbMetaDataCollectionNames.cs
- SystemInfo.cs
- Type.cs
- DocumentProperties.cs
- ForwardPositionQuery.cs
- EventEntry.cs
- Decoder.cs
- StickyNoteAnnotations.cs
- XmlSchemaValidationException.cs
- TableItemProviderWrapper.cs
- InheritablePropertyChangeInfo.cs
- DynamicActivityXamlReader.cs
- ScalarConstant.cs
- COAUTHINFO.cs
- QueryStatement.cs
- IncrementalHitTester.cs
- OrderPreservingSpoolingTask.cs
- ScriptReferenceBase.cs
- DataGridHyperlinkColumn.cs
- DataObjectFieldAttribute.cs
- SqlFunctions.cs
- TextParentUndoUnit.cs
- EndpointConfigContainer.cs
- ScriptReference.cs
- X500Name.cs
- UserNamePasswordValidator.cs
- XmlTypeAttribute.cs
- SectionInput.cs
- BitmapData.cs
- ThaiBuddhistCalendar.cs
- MTConfigUtil.cs
- PersonalizationEntry.cs
- FieldAccessException.cs
- Pair.cs
- _SslState.cs
- COAUTHINFO.cs
- NavigationWindow.cs
- ChannelSinkStacks.cs
- Oid.cs
- HttpStreamMessageEncoderFactory.cs
- IIS7WorkerRequest.cs
- DoubleLinkListEnumerator.cs
- DiagnosticTraceSource.cs
- SafeRightsManagementPubHandle.cs
- PagerSettings.cs
- URL.cs
- StrongNamePublicKeyBlob.cs
- TransformerInfoCollection.cs
- LabelLiteral.cs
- SoapAttributeAttribute.cs
- Vector3DAnimation.cs
- ParameterElementCollection.cs
- objectresult_tresulttype.cs
- PipelineDeploymentState.cs
- QuotaExceededException.cs
- TrackingMemoryStream.cs
- ContextStaticAttribute.cs
- TrackingConditionCollection.cs
- BaseDataListActionList.cs
- SortedDictionary.cs
- ImageSourceConverter.cs
- DecimalConstantAttribute.cs
- CompilerTypeWithParams.cs
- Marshal.cs
- MexNamedPipeBindingElement.cs
- EncryptedType.cs
- RelatedPropertyManager.cs
- Expression.cs
- ChineseLunisolarCalendar.cs