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
- GuidConverter.cs
- SafeNativeMethodsCLR.cs
- KeyInfo.cs
- DirtyTextRange.cs
- SqlTransaction.cs
- BitmapCodecInfoInternal.cs
- XmlComment.cs
- GenericTypeParameterBuilder.cs
- MDIControlStrip.cs
- SqlAggregateChecker.cs
- EntityTransaction.cs
- Padding.cs
- DLinqDataModelProvider.cs
- XmlSchemaNotation.cs
- ScriptControl.cs
- UrlMappingsSection.cs
- Point.cs
- xsdvalidator.cs
- XhtmlBasicLiteralTextAdapter.cs
- DockAndAnchorLayout.cs
- WindowsSolidBrush.cs
- DoWorkEventArgs.cs
- RowVisual.cs
- LabelLiteral.cs
- Matrix3DStack.cs
- ItemsControl.cs
- ICspAsymmetricAlgorithm.cs
- AttributeCollection.cs
- NullRuntimeConfig.cs
- ClientCultureInfo.cs
- TypedTableBaseExtensions.cs
- FileLogRecord.cs
- CharStorage.cs
- StringValidatorAttribute.cs
- PackWebRequest.cs
- SqlNodeAnnotations.cs
- ImageSource.cs
- OnOperation.cs
- SweepDirectionValidation.cs
- CodeSubDirectoriesCollection.cs
- BufferModesCollection.cs
- TraceEventCache.cs
- UndirectedGraph.cs
- Line.cs
- DrawListViewSubItemEventArgs.cs
- SoapFault.cs
- EdmSchemaAttribute.cs
- Table.cs
- ClientScriptItem.cs
- ManagementQuery.cs
- DoubleConverter.cs
- HijriCalendar.cs
- figurelengthconverter.cs
- AssemblySettingAttributes.cs
- DataServiceExpressionVisitor.cs
- DataGridViewDataErrorEventArgs.cs
- XmlSchemaRedefine.cs
- ThrowHelper.cs
- InfoCardRSACryptoProvider.cs
- DataGridViewUtilities.cs
- KeyNotFoundException.cs
- CodeDirectoryCompiler.cs
- ServiceModelExtensionElement.cs
- HybridCollection.cs
- WinEventHandler.cs
- ValidationPropertyAttribute.cs
- InputProcessorProfiles.cs
- ISAPIApplicationHost.cs
- BindingRestrictions.cs
- CompositeKey.cs
- TextElementAutomationPeer.cs
- FreezableCollection.cs
- TriggerActionCollection.cs
- Run.cs
- HitTestFilterBehavior.cs
- SplitterPanel.cs
- XsltConvert.cs
- TimeoutException.cs
- MethodToken.cs
- Graph.cs
- AttachmentCollection.cs
- ViewBox.cs
- CompoundFileIOPermission.cs
- XslAst.cs
- HttpDictionary.cs
- MaskedTextProvider.cs
- MimeFormReflector.cs
- FolderLevelBuildProviderCollection.cs
- TextTreeTextElementNode.cs
- SecurityToken.cs
- PromptEventArgs.cs
- LinkedResource.cs
- WebDisplayNameAttribute.cs
- SQLMembershipProvider.cs
- MarkupExtensionParser.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- HttpServerUtilityWrapper.cs
- SystemIcmpV6Statistics.cs
- _AcceptOverlappedAsyncResult.cs
- DragEvent.cs