Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / xsp / System / Web / UI / WebControls / QueryStringParameter.cs / 2 / 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
- ContractListAdapter.cs
- FormViewInsertedEventArgs.cs
- NamespaceImport.cs
- KeySplineConverter.cs
- GenericUriParser.cs
- ValueTable.cs
- ListView.cs
- BamlVersionHeader.cs
- ClrProviderManifest.cs
- DataSourceCollectionBase.cs
- LinkArea.cs
- AdapterDictionary.cs
- XmlHierarchyData.cs
- PropertyKey.cs
- SerializerProvider.cs
- LinqDataSource.cs
- ActionFrame.cs
- SqlServer2KCompatibilityAnnotation.cs
- ForEachAction.cs
- TypeDelegator.cs
- AsyncStreamReader.cs
- SqlExpander.cs
- NavigationPropertyEmitter.cs
- X509ThumbprintKeyIdentifierClause.cs
- HttpListenerResponse.cs
- AccessorTable.cs
- MatrixCamera.cs
- KeyGestureConverter.cs
- ConstructorArgumentAttribute.cs
- GraphicsPathIterator.cs
- CustomAttribute.cs
- ClipboardProcessor.cs
- Storyboard.cs
- Int64Converter.cs
- DesignColumn.cs
- DateTimeConstantAttribute.cs
- StringUtil.cs
- DBSqlParserTable.cs
- ManagementNamedValueCollection.cs
- Rect3D.cs
- PropertyChangedEventManager.cs
- BoundField.cs
- SmtpSection.cs
- BitmapScalingModeValidation.cs
- CodeIndexerExpression.cs
- SingleStorage.cs
- UnrecognizedAssertionsBindingElement.cs
- Transaction.cs
- StringReader.cs
- LogLogRecordEnumerator.cs
- ISAPIRuntime.cs
- XmlValidatingReader.cs
- AnonymousIdentificationSection.cs
- ThousandthOfEmRealPoints.cs
- _RequestCacheProtocol.cs
- TranslateTransform3D.cs
- Internal.cs
- odbcmetadatacolumnnames.cs
- Decoder.cs
- ExtensionDataObject.cs
- IntegerFacetDescriptionElement.cs
- GPRECTF.cs
- HorizontalAlignConverter.cs
- Currency.cs
- ServiceConfigurationTraceRecord.cs
- BigInt.cs
- MetadataFile.cs
- QilExpression.cs
- Rect3DConverter.cs
- ConfigUtil.cs
- FileLoadException.cs
- OdbcConnectionPoolProviderInfo.cs
- ProcessHost.cs
- ConnectionConsumerAttribute.cs
- HybridDictionary.cs
- AccessControlEntry.cs
- XamlWriter.cs
- ElementHost.cs
- IProducerConsumerCollection.cs
- Button.cs
- ResponseStream.cs
- StructuredType.cs
- ByteStreamBufferedMessageData.cs
- Resources.Designer.cs
- Vector3DKeyFrameCollection.cs
- HostingEnvironmentException.cs
- Table.cs
- KeyboardDevice.cs
- Evaluator.cs
- DigestComparer.cs
- MenuEventArgs.cs
- RemoveStoryboard.cs
- SmiMetaDataProperty.cs
- SqlUserDefinedAggregateAttribute.cs
- HMACSHA512.cs
- IncrementalCompileAnalyzer.cs
- Matrix3DConverter.cs
- PropertyGridView.cs
- GradientBrush.cs
- KeyGesture.cs