Code:
/ DotNET / DotNET / 8.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
- PixelShader.cs
- CustomValidator.cs
- StylusPointCollection.cs
- PointAnimation.cs
- TypeDefinition.cs
- DateRangeEvent.cs
- SystemParameters.cs
- FrameworkContentElementAutomationPeer.cs
- QueryOutputWriter.cs
- PeerCollaboration.cs
- Encoding.cs
- MemberProjectedSlot.cs
- GradientStop.cs
- ProtectedConfigurationProviderCollection.cs
- InternalResources.cs
- WebPartCollection.cs
- XmlNodeReader.cs
- HwndTarget.cs
- EditableLabelControl.cs
- DetailsViewCommandEventArgs.cs
- MimeMapping.cs
- DesignerToolStripControlHost.cs
- TextEditorThreadLocalStore.cs
- FlowLayoutSettings.cs
- SiteMapNodeItemEventArgs.cs
- DecoderFallback.cs
- TextTreeFixupNode.cs
- XmlCDATASection.cs
- BindingSource.cs
- OperationCanceledException.cs
- CallbackException.cs
- InstanceDescriptor.cs
- OAVariantLib.cs
- cookiecontainer.cs
- SecurityTokenException.cs
- webeventbuffer.cs
- _ContextAwareResult.cs
- TimeZone.cs
- OAVariantLib.cs
- SignatureTargetIdManager.cs
- dsa.cs
- FlowDocumentReader.cs
- Message.cs
- CursorConverter.cs
- ComponentEditorForm.cs
- MultiBinding.cs
- Clock.cs
- ManagedWndProcTracker.cs
- InvalidCommandTreeException.cs
- ColumnCollection.cs
- InternalCache.cs
- PrintPreviewControl.cs
- ScriptResourceHandler.cs
- TextFormattingConverter.cs
- AutoCompleteStringCollection.cs
- NamedPermissionSet.cs
- TailCallAnalyzer.cs
- MdImport.cs
- ScaleTransform.cs
- HttpServerUtilityBase.cs
- BinaryParser.cs
- InvokeMemberBinder.cs
- ContentHostHelper.cs
- Rights.cs
- AdapterDictionary.cs
- WebEventTraceProvider.cs
- APCustomTypeDescriptor.cs
- GenericAuthenticationEventArgs.cs
- TextFormattingConverter.cs
- NamespaceInfo.cs
- SHA1CryptoServiceProvider.cs
- MatrixCamera.cs
- MediaPlayer.cs
- ImageSourceValueSerializer.cs
- Publisher.cs
- CheckBoxField.cs
- TreeViewCancelEvent.cs
- RangeValuePattern.cs
- IndependentlyAnimatedPropertyMetadata.cs
- EdgeProfileValidation.cs
- DataComponentNameHandler.cs
- OleAutBinder.cs
- ItemChangedEventArgs.cs
- ContainerSelectorGlyph.cs
- RuleRef.cs
- DockingAttribute.cs
- XmlReflectionImporter.cs
- CounterCreationData.cs
- HttpPostedFile.cs
- VectorAnimation.cs
- UrlAuthorizationModule.cs
- BitmapEffectInputData.cs
- SmiSettersStream.cs
- WebBrowserBase.cs
- BasicExpressionVisitor.cs
- NamespaceQuery.cs
- GetUserPreferenceRequest.cs
- DataContractSerializerOperationGenerator.cs
- SelectionItemPattern.cs
- SplitterEvent.cs