Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / 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. //------------------------------------------------------------------------------ //// 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- RangeBaseAutomationPeer.cs
- PageRanges.cs
- FixedPageAutomationPeer.cs
- ConfigXmlText.cs
- CapabilitiesState.cs
- MessageSecurityOverTcpElement.cs
- MarkupCompiler.cs
- ContentElement.cs
- BitmapSourceSafeMILHandle.cs
- DataGridView.cs
- FormViewInsertEventArgs.cs
- counter.cs
- UnsafeNativeMethods.cs
- TextEndOfParagraph.cs
- BitmapScalingModeValidation.cs
- ResourceProviderFactory.cs
- ToolBarTray.cs
- ActivityExecutorDelegateInfo.cs
- ChangePassword.cs
- PageStatePersister.cs
- DiscoveryInnerClientAdhocCD1.cs
- CacheEntry.cs
- SmtpFailedRecipientException.cs
- ValidationEventArgs.cs
- Parser.cs
- ActivationServices.cs
- XmlSchemaSimpleTypeUnion.cs
- PermissionToken.cs
- SamlAudienceRestrictionCondition.cs
- ExtractedStateEntry.cs
- PasswordTextNavigator.cs
- ParameterSubsegment.cs
- GridViewColumnHeaderAutomationPeer.cs
- CompilerCollection.cs
- MailAddressCollection.cs
- MobileListItem.cs
- SelectionRange.cs
- WebReferencesBuildProvider.cs
- CommentGlyph.cs
- EntitySqlException.cs
- ListArgumentProvider.cs
- SoapIgnoreAttribute.cs
- XmlConvert.cs
- Pens.cs
- MultipartContentParser.cs
- CharacterBufferReference.cs
- DragDrop.cs
- DataSourceCache.cs
- IPAddress.cs
- AllMembershipCondition.cs
- LocalizableResourceBuilder.cs
- EntitySqlQueryCacheEntry.cs
- SafeEventHandle.cs
- StructuredTypeInfo.cs
- RuntimeCompatibilityAttribute.cs
- SerializationInfoEnumerator.cs
- CodeCatchClause.cs
- PointAnimationBase.cs
- InputBinding.cs
- ProviderSettings.cs
- ConfigurationSectionCollection.cs
- DataTableMappingCollection.cs
- DataGridViewSelectedColumnCollection.cs
- UInt64Storage.cs
- ListItemCollection.cs
- GridViewItemAutomationPeer.cs
- UpdateCompiler.cs
- EnumMemberAttribute.cs
- ColumnProvider.cs
- ImageFormat.cs
- PolicyUnit.cs
- DocumentPageHost.cs
- WebPartEditVerb.cs
- safelink.cs
- WebContext.cs
- ThousandthOfEmRealPoints.cs
- InfoCardSymmetricAlgorithm.cs
- FaultContractAttribute.cs
- PropertyPathWorker.cs
- DeviceContext.cs
- CompletedAsyncResult.cs
- SiteMapHierarchicalDataSourceView.cs
- ConfigurationErrorsException.cs
- DocumentPaginator.cs
- XmlArrayItemAttributes.cs
- DependentList.cs
- WindowVisualStateTracker.cs
- MarkerProperties.cs
- RegexCode.cs
- SecureUICommand.cs
- ShutDownListener.cs
- Relationship.cs
- WorkflowInstanceTerminatedRecord.cs
- ISFTagAndGuidCache.cs
- MimeImporter.cs
- ListViewItem.cs
- SpecialTypeDataContract.cs
- ReadOnlyDictionary.cs
- EventsTab.cs
- DataPagerFieldItem.cs