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
- XmlSchemaAny.cs
- ThumbAutomationPeer.cs
- ConnectionStringSettingsCollection.cs
- CompiledIdentityConstraint.cs
- ValueChangedEventManager.cs
- ProcessProtocolHandler.cs
- Signature.cs
- XPathExpr.cs
- UseManagedPresentationBindingElement.cs
- SimpleApplicationHost.cs
- DirectoryObjectSecurity.cs
- SessionIDManager.cs
- ScriptingWebServicesSectionGroup.cs
- ActiveXSite.cs
- WebPartAddingEventArgs.cs
- CodeTypeConstructor.cs
- CodeParameterDeclarationExpressionCollection.cs
- EditorOptionAttribute.cs
- InputEventArgs.cs
- XmlRawWriter.cs
- DecimalConstantAttribute.cs
- HasCopySemanticsAttribute.cs
- errorpatternmatcher.cs
- VisualStyleTypesAndProperties.cs
- HttpListenerResponse.cs
- PauseStoryboard.cs
- WorkflowPersistenceService.cs
- FacetDescriptionElement.cs
- ReplyChannelAcceptor.cs
- BufferedGraphicsManager.cs
- IconBitmapDecoder.cs
- JournalEntryStack.cs
- BinaryFormatterSinks.cs
- EntityDataSourceConfigureObjectContext.cs
- TextComposition.cs
- XmlUnspecifiedAttribute.cs
- XmlnsDictionary.cs
- WebReferencesBuildProvider.cs
- Compiler.cs
- SchemaCollectionPreprocessor.cs
- CommandConverter.cs
- StorageEndPropertyMapping.cs
- ReflectionTypeLoadException.cs
- ListViewDeletedEventArgs.cs
- DataTable.cs
- MD5.cs
- TextSpanModifier.cs
- DocumentOrderQuery.cs
- FontStretches.cs
- ExpandableObjectConverter.cs
- FileFormatException.cs
- DataControlFieldCell.cs
- WebConfigurationManager.cs
- AsymmetricKeyExchangeFormatter.cs
- StylusDevice.cs
- DependsOnAttribute.cs
- EncoderBestFitFallback.cs
- Splitter.cs
- CustomErrorCollection.cs
- _LazyAsyncResult.cs
- translator.cs
- DetailsViewRow.cs
- X509Utils.cs
- HtmlInputImage.cs
- ConfigsHelper.cs
- ListSortDescriptionCollection.cs
- UnionCodeGroup.cs
- SignatureResourcePool.cs
- ManagementExtension.cs
- ManagementInstaller.cs
- DrawingBrush.cs
- PersistChildrenAttribute.cs
- Trace.cs
- RoutedEvent.cs
- TakeQueryOptionExpression.cs
- XmlResolver.cs
- Table.cs
- WindowsSlider.cs
- DataGridViewImageCell.cs
- HashMembershipCondition.cs
- RichTextBoxAutomationPeer.cs
- LinkedList.cs
- DurationConverter.cs
- BuildProvider.cs
- DebuggerAttributes.cs
- HostedElements.cs
- InstanceCollisionException.cs
- DocumentViewerAutomationPeer.cs
- SequenceDesignerAccessibleObject.cs
- SocketCache.cs
- OptimalTextSource.cs
- DataGridViewCellEventArgs.cs
- BinarySerializer.cs
- Graphics.cs
- MatrixStack.cs
- MethodCallConverter.cs
- EditBehavior.cs
- OutKeywords.cs
- SpecialNameAttribute.cs
- WebConfigurationFileMap.cs