Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / xsp / System / Web / UI / WebControls / QueryStringParameter.cs / 1 / 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
- MenuAutoFormat.cs
- odbcmetadatafactory.cs
- RegistrationServices.cs
- ShutDownListener.cs
- TextOutput.cs
- TailCallAnalyzer.cs
- ToolStripDropDownClosingEventArgs.cs
- XNameConverter.cs
- AlphaSortedEnumConverter.cs
- QuaternionKeyFrameCollection.cs
- HotSpotCollection.cs
- SqlDataSource.cs
- StringResourceManager.cs
- StructuredTypeEmitter.cs
- HandleCollector.cs
- RadioButtonFlatAdapter.cs
- PageHandlerFactory.cs
- XmlSchemaException.cs
- TdsParserStaticMethods.cs
- StringCollectionEditor.cs
- ByteStream.cs
- DBParameter.cs
- Rotation3DAnimationBase.cs
- ColumnCollection.cs
- ResourcePool.cs
- TypeGeneratedEventArgs.cs
- SchemaNotation.cs
- SoapHeaderException.cs
- MultiSelectRootGridEntry.cs
- SessionEndedEventArgs.cs
- XPathArrayIterator.cs
- Accessible.cs
- MessageEventSubscriptionService.cs
- QueryAsyncResult.cs
- UnknownWrapper.cs
- AlphabeticalEnumConverter.cs
- Assert.cs
- SecurityException.cs
- XmlDataLoader.cs
- AutomationEvent.cs
- WhitespaceRule.cs
- EmptyQuery.cs
- ItemsPanelTemplate.cs
- sqlmetadatafactory.cs
- SamlAdvice.cs
- ToolStripTemplateNode.cs
- DatePickerAutomationPeer.cs
- Pkcs7Recipient.cs
- DoubleAnimationBase.cs
- XPathQueryGenerator.cs
- _PooledStream.cs
- SQLConvert.cs
- BrushValueSerializer.cs
- QilScopedVisitor.cs
- MailDefinition.cs
- HttpHostedTransportConfiguration.cs
- ApplicationContext.cs
- TreeNodeEventArgs.cs
- ObjectConverter.cs
- DictionaryManager.cs
- NullableBoolConverter.cs
- SettingsPropertyWrongTypeException.cs
- ChildTable.cs
- StickyNoteContentControl.cs
- ViewGenerator.cs
- ObfuscateAssemblyAttribute.cs
- HostedHttpContext.cs
- LocalizabilityAttribute.cs
- WebPartTransformerAttribute.cs
- IsolatedStorageFilePermission.cs
- RtfToXamlReader.cs
- XmlResolver.cs
- DnsElement.cs
- WizardStepBase.cs
- MetadataSerializer.cs
- SessionStateUtil.cs
- NestedContainer.cs
- CoreChannel.cs
- PropertyNames.cs
- SeverityFilter.cs
- HighlightComponent.cs
- ConnectionManagementSection.cs
- CodeRegionDirective.cs
- RtfFormatStack.cs
- DrawingGroup.cs
- infer.cs
- OpCopier.cs
- XamlFigureLengthSerializer.cs
- MarshalDirectiveException.cs
- ImportCatalogPart.cs
- FontInfo.cs
- TextViewBase.cs
- ThreadPool.cs
- CellParaClient.cs
- SamlSerializer.cs
- DataGridItemCollection.cs
- ObjectDataSourceDisposingEventArgs.cs
- SubqueryRules.cs
- DescendantQuery.cs
- EntityDataSourceWrapperCollection.cs