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
- TdsParserStateObject.cs
- LinkLabel.cs
- UnknownBitmapEncoder.cs
- TerminatorSinks.cs
- DefaultValueMapping.cs
- ListViewInsertedEventArgs.cs
- COM2ExtendedBrowsingHandler.cs
- WebBrowserNavigatingEventHandler.cs
- MimeFormImporter.cs
- CompareValidator.cs
- Animatable.cs
- MenuItemCollectionEditor.cs
- TextBlock.cs
- XmlValueConverter.cs
- SqlDataRecord.cs
- Processor.cs
- UserControlCodeDomTreeGenerator.cs
- DataSetUtil.cs
- StringCollection.cs
- ManagementObject.cs
- XmlUrlResolver.cs
- RuleSettings.cs
- NoPersistHandle.cs
- RawMouseInputReport.cs
- SchemaTableColumn.cs
- SymbolResolver.cs
- XpsFilter.cs
- ButtonField.cs
- GeneralTransform3DGroup.cs
- ReflectionPermission.cs
- Directory.cs
- TextCharacters.cs
- CommandField.cs
- MultilineStringConverter.cs
- _TLSstream.cs
- DataServiceRequest.cs
- CodeTypeMember.cs
- HtmlWindow.cs
- MarkupObject.cs
- ResourcesBuildProvider.cs
- QilLiteral.cs
- LateBoundBitmapDecoder.cs
- InstanceDescriptor.cs
- PasswordBox.cs
- XmlAnyAttributeAttribute.cs
- AstTree.cs
- NonParentingControl.cs
- StreamGeometry.cs
- PresentationAppDomainManager.cs
- WorkflowTransactionOptions.cs
- PropertyMappingExceptionEventArgs.cs
- TextEditorMouse.cs
- X509Certificate.cs
- Exceptions.cs
- ConfigurationValidatorAttribute.cs
- ListControlConvertEventArgs.cs
- SettingsProperty.cs
- wgx_commands.cs
- Bidi.cs
- _NativeSSPI.cs
- ContentOperations.cs
- TextParagraphCache.cs
- IgnoreFileBuildProvider.cs
- DataGridState.cs
- HelloMessage11.cs
- AccessDataSource.cs
- StrongTypingException.cs
- TreeViewBindingsEditor.cs
- ProxyManager.cs
- TextTreeUndoUnit.cs
- MaskPropertyEditor.cs
- Assembly.cs
- StringReader.cs
- IdnElement.cs
- SizeValueSerializer.cs
- SHA384CryptoServiceProvider.cs
- SecurityUtils.cs
- VectorCollection.cs
- ColorDialog.cs
- Page.cs
- ControlParameter.cs
- CacheForPrimitiveTypes.cs
- SourceFilter.cs
- PEFileReader.cs
- OleDbError.cs
- DefaultBinder.cs
- InvalidCastException.cs
- CalendarBlackoutDatesCollection.cs
- ISAPIApplicationHost.cs
- ScriptManagerProxy.cs
- Decorator.cs
- StrongNameIdentityPermission.cs
- BinHexEncoder.cs
- PanningMessageFilter.cs
- NullableIntSumAggregationOperator.cs
- ColumnWidthChangedEvent.cs
- InstallHelper.cs
- PolicyDesigner.cs
- AutomationIdentifierGuids.cs
- HandlerMappingMemo.cs