Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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.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, 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]; } } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- HierarchicalDataTemplate.cs
- RequestCacheEntry.cs
- Calendar.cs
- WindowsRichEditRange.cs
- XmlQualifiedName.cs
- EntityDataSourceState.cs
- MetabaseReader.cs
- QilTargetType.cs
- SortQuery.cs
- RSAProtectedConfigurationProvider.cs
- TableLayoutCellPaintEventArgs.cs
- MappingModelBuildProvider.cs
- RelatedCurrencyManager.cs
- StrongTypingException.cs
- KnownTypesHelper.cs
- XmlSchemaSet.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- WindowsStatic.cs
- MultiAsyncResult.cs
- SettingsPropertyCollection.cs
- InfoCardRequestException.cs
- EditingMode.cs
- TargetControlTypeCache.cs
- HandlerWithFactory.cs
- StylusButtonEventArgs.cs
- PriorityBindingExpression.cs
- AttachedAnnotationChangedEventArgs.cs
- TextElement.cs
- DataGridViewColumnHeaderCell.cs
- ObjectDisposedException.cs
- PassportAuthentication.cs
- _NegoStream.cs
- SqlConnectionManager.cs
- Membership.cs
- ExpressionPrefixAttribute.cs
- DbgCompiler.cs
- SimpleBitVector32.cs
- DataTransferEventArgs.cs
- initElementDictionary.cs
- HyperlinkAutomationPeer.cs
- listitem.cs
- DateTimeConstantAttribute.cs
- IUnknownConstantAttribute.cs
- ImportContext.cs
- WebBrowserProgressChangedEventHandler.cs
- Crypto.cs
- HijriCalendar.cs
- RowToParametersTransformer.cs
- ProcessHostMapPath.cs
- InvalidDataContractException.cs
- COM2FontConverter.cs
- RemoteCryptoRsaServiceProvider.cs
- ProtocolsConfigurationEntry.cs
- UdpSocket.cs
- FrameworkObject.cs
- TransformConverter.cs
- TraceSwitch.cs
- WsatAdminException.cs
- Update.cs
- HighlightComponent.cs
- BinaryUtilClasses.cs
- PopupRootAutomationPeer.cs
- LinearGradientBrush.cs
- StylusSystemGestureEventArgs.cs
- WebPartVerbsEventArgs.cs
- EventLogPermissionEntryCollection.cs
- Evidence.cs
- VersionPair.cs
- PathTooLongException.cs
- XmlNamespaceManager.cs
- AssociationSetMetadata.cs
- PtsCache.cs
- MemberCollection.cs
- HttpModule.cs
- NameNode.cs
- XmlException.cs
- SessionStateItemCollection.cs
- StartFileNameEditor.cs
- WsdlInspector.cs
- HyperLinkDesigner.cs
- ParserOptions.cs
- AuthorizationSection.cs
- URLString.cs
- UpDownBaseDesigner.cs
- VirtualPathUtility.cs
- Axis.cs
- XmlNodeList.cs
- COM2IProvidePropertyBuilderHandler.cs
- PointConverter.cs
- COM2PropertyBuilderUITypeEditor.cs
- OperationInfoBase.cs
- TransactionContextValidator.cs
- Mapping.cs
- ScriptHandlerFactory.cs
- Pen.cs
- BinaryNode.cs
- FixUpCollection.cs
- SmtpFailedRecipientsException.cs
- URLMembershipCondition.cs
- RegexCompiler.cs