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
- wgx_exports.cs
- RegexWorker.cs
- FixUpCollection.cs
- AuthenticationConfig.cs
- UrlMappingCollection.cs
- ListViewInsertEventArgs.cs
- BinaryOperationBinder.cs
- OdbcHandle.cs
- WebPartVerb.cs
- BufferModesCollection.cs
- FloaterParaClient.cs
- ArithmeticException.cs
- PresentationSource.cs
- TextLineBreak.cs
- PasswordValidationException.cs
- ContractNamespaceAttribute.cs
- CodeDelegateCreateExpression.cs
- TextTreePropertyUndoUnit.cs
- basenumberconverter.cs
- TextDecorationCollection.cs
- EncoderBestFitFallback.cs
- precedingsibling.cs
- DataRowCollection.cs
- LogPolicy.cs
- SafeNativeMethods.cs
- SyndicationSerializer.cs
- ISessionStateStore.cs
- MetadataUtilsSmi.cs
- Array.cs
- ZipFileInfo.cs
- ConstructorExpr.cs
- XmlSchemaObject.cs
- EncodingTable.cs
- HttpListener.cs
- CriticalFinalizerObject.cs
- ConfigXmlSignificantWhitespace.cs
- SkipStoryboardToFill.cs
- RotateTransform.cs
- SafeBitVector32.cs
- ExpressionNormalizer.cs
- HtmlContainerControl.cs
- XamlUtilities.cs
- DragEventArgs.cs
- MemberRelationshipService.cs
- ListenerChannelContext.cs
- PnrpPeerResolverElement.cs
- KeyFrames.cs
- FreezableCollection.cs
- Claim.cs
- XmlValidatingReader.cs
- shaperfactoryquerycachekey.cs
- DataContractSet.cs
- Converter.cs
- RuleSetReference.cs
- DrawingGroupDrawingContext.cs
- OverflowException.cs
- CollectionViewSource.cs
- ComEventsHelper.cs
- BinaryFormatterWriter.cs
- HostedTransportConfigurationManager.cs
- QueryCursorEventArgs.cs
- ProfilePropertySettings.cs
- FontDifferentiator.cs
- SafeLocalAllocation.cs
- LineGeometry.cs
- XmlKeywords.cs
- AlphabeticalEnumConverter.cs
- DataGridRowEventArgs.cs
- XmlDataFileEditor.cs
- QueryGeneratorBase.cs
- ReceiveSecurityHeaderElementManager.cs
- DependencyPropertyChangedEventArgs.cs
- DetailsViewUpdateEventArgs.cs
- BinHexDecoder.cs
- IndependentAnimationStorage.cs
- ScrollChangedEventArgs.cs
- AlphaSortedEnumConverter.cs
- FloaterParagraph.cs
- ByeOperationAsyncResult.cs
- QuotaExceededException.cs
- HatchBrush.cs
- transactioncontext.cs
- XmlSerializableServices.cs
- NotifyIcon.cs
- WeakReferenceEnumerator.cs
- TypeUtils.cs
- SiteMapNodeItemEventArgs.cs
- WebPartZoneCollection.cs
- Comparer.cs
- Exceptions.cs
- Exceptions.cs
- XsltLoader.cs
- InputScope.cs
- QueuePathDialog.cs
- PagesSection.cs
- InfoCardRSACryptoProvider.cs
- NativeObjectSecurity.cs
- ComboBox.cs
- ReadWriteControlDesigner.cs
- TabControlCancelEvent.cs