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
- FixedPosition.cs
- ObjectComplexPropertyMapping.cs
- InfoCardRSAPKCS1KeyExchangeDeformatter.cs
- SoapMessage.cs
- BStrWrapper.cs
- ThreadNeutralSemaphore.cs
- PerformanceCounter.cs
- SequenceQuery.cs
- PrincipalPermission.cs
- Popup.cs
- DataContractJsonSerializer.cs
- BaseCodeDomTreeGenerator.cs
- PolicyManager.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- OverrideMode.cs
- StrokeSerializer.cs
- Funcletizer.cs
- DoubleStorage.cs
- HostingEnvironment.cs
- Debugger.cs
- X509CertificateCollection.cs
- RtfControls.cs
- ShutDownListener.cs
- FacetDescription.cs
- OdbcErrorCollection.cs
- RequestQueryProcessor.cs
- ResourceProviderFactory.cs
- ToolboxItemFilterAttribute.cs
- TransformCryptoHandle.cs
- CoTaskMemSafeHandle.cs
- HGlobalSafeHandle.cs
- LinkConverter.cs
- LifetimeServices.cs
- AccessorTable.cs
- XPathSingletonIterator.cs
- TypeBrowser.xaml.cs
- xamlnodes.cs
- DataRowChangeEvent.cs
- GeneralTransformCollection.cs
- QilStrConcatenator.cs
- XPathSelectionIterator.cs
- ResolveMatches11.cs
- ContentControl.cs
- QuaternionConverter.cs
- Geometry3D.cs
- TreeNodeSelectionProcessor.cs
- Attachment.cs
- XmlValueConverter.cs
- ProfessionalColorTable.cs
- ViewStateException.cs
- BoundColumn.cs
- CodeTypeDelegate.cs
- DataRowIndexBuffer.cs
- CompositionDesigner.cs
- Block.cs
- sapiproxy.cs
- WindowsListViewItemCheckBox.cs
- SafeFileMapViewHandle.cs
- XmlAutoDetectWriter.cs
- CheckBox.cs
- GraphicsContext.cs
- HMAC.cs
- SecurityToken.cs
- AttributeAction.cs
- LassoSelectionBehavior.cs
- cryptoapiTransform.cs
- ThreadStaticAttribute.cs
- StickyNoteContentControl.cs
- HtmlInputImage.cs
- XmlQueryStaticData.cs
- RegionIterator.cs
- BaseServiceProvider.cs
- CompositeDesignerAccessibleObject.cs
- Executor.cs
- CompilerResults.cs
- CorrelationRequestContext.cs
- XPathConvert.cs
- ProxyManager.cs
- LassoHelper.cs
- RadioButtonAutomationPeer.cs
- DataSvcMapFile.cs
- OracleInternalConnection.cs
- FilterException.cs
- WebRequestModulesSection.cs
- TrackingServices.cs
- WorkItem.cs
- CoTaskMemHandle.cs
- SendKeys.cs
- ObjectList.cs
- Operand.cs
- CompatibleIComparer.cs
- ImageAttributes.cs
- XmlTextReaderImpl.cs
- WebPart.cs
- PackageRelationshipSelector.cs
- ErrorEventArgs.cs
- brushes.cs
- ServiceContractDetailViewControl.cs
- QueryStringParameter.cs
- ExtensionWindowResizeGrip.cs