Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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. // //----------------------------------------------------------------------------- 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DictionaryChange.cs
- XamlHostingSection.cs
- PropertyEmitterBase.cs
- BuildProvider.cs
- MethodBody.cs
- ResizingMessageFilter.cs
- ToolStripControlHost.cs
- glyphs.cs
- ConnectionConsumerAttribute.cs
- Psha1DerivedKeyGenerator.cs
- FileVersionInfo.cs
- HttpGetClientProtocol.cs
- Panel.cs
- GeneralTransformGroup.cs
- SizeAnimation.cs
- QueryOutputWriter.cs
- querybuilder.cs
- OpCodes.cs
- ThaiBuddhistCalendar.cs
- SafeFindHandle.cs
- TrackingParticipant.cs
- Int32Collection.cs
- SecurityTokenProviderContainer.cs
- ResizeGrip.cs
- ObservableDictionary.cs
- XPathPatternParser.cs
- HttpModuleAction.cs
- InvalidTimeZoneException.cs
- ArrayConverter.cs
- Console.cs
- HostTimeoutsElement.cs
- controlskin.cs
- WorkflowMarkupSerializerMapping.cs
- EmptyStringExpandableObjectConverter.cs
- SiteMapNode.cs
- PageHandlerFactory.cs
- XmlSerializerSection.cs
- CalendarDay.cs
- StorageEntitySetMapping.cs
- PersonalizableTypeEntry.cs
- SystemIPv6InterfaceProperties.cs
- EventlogProvider.cs
- TableDetailsCollection.cs
- BamlTreeUpdater.cs
- ComponentManagerBroker.cs
- DoubleUtil.cs
- UpdateExpressionVisitor.cs
- UpdateTranslator.cs
- UTF32Encoding.cs
- CapabilitiesSection.cs
- FileDetails.cs
- MethodImplAttribute.cs
- ListItemParagraph.cs
- Selection.cs
- WebBrowser.cs
- CapabilitiesUse.cs
- DataGridCellItemAutomationPeer.cs
- SqlServices.cs
- EventLogStatus.cs
- NamespaceInfo.cs
- DBConcurrencyException.cs
- BinaryObjectInfo.cs
- SchemaNames.cs
- ProfileService.cs
- BuildDependencySet.cs
- WebBrowserProgressChangedEventHandler.cs
- RecipientInfo.cs
- Rotation3DAnimationBase.cs
- XPathMessageFilter.cs
- ServiceModelActivity.cs
- DbSetClause.cs
- SqlCacheDependencyDatabaseCollection.cs
- Calendar.cs
- Pointer.cs
- CustomSignedXml.cs
- SourceFileInfo.cs
- AxisAngleRotation3D.cs
- RootBrowserWindowAutomationPeer.cs
- ZipIOExtraFieldZip64Element.cs
- XslVisitor.cs
- DataBoundControlHelper.cs
- SqlClientWrapperSmiStream.cs
- WebPermission.cs
- AuthenticationConfig.cs
- PriorityBindingExpression.cs
- SpAudioStreamWrapper.cs
- PerfCounters.cs
- TypeSchema.cs
- PackageProperties.cs
- LiteralLink.cs
- SHA1Cng.cs
- WebContext.cs
- TiffBitmapDecoder.cs
- CodeObjectCreateExpression.cs
- TextDecorations.cs
- QuotaThrottle.cs
- UnaryExpression.cs
- MonthChangedEventArgs.cs
- AutomationEventArgs.cs
- SessionPageStatePersister.cs