Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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.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
- ByteStack.cs
- FormattedTextSymbols.cs
- TraceXPathNavigator.cs
- DeclarativeConditionsCollection.cs
- InvalidCastException.cs
- JsonUriDataContract.cs
- KeyFrames.cs
- xmlfixedPageInfo.cs
- Marshal.cs
- DataControlFieldCell.cs
- UriSection.cs
- TraceLog.cs
- ImpersonationContext.cs
- SendMailErrorEventArgs.cs
- XmlSchemaSequence.cs
- XmlAttributeProperties.cs
- XmlSchemaSimpleContent.cs
- AvtEvent.cs
- TiffBitmapDecoder.cs
- Size.cs
- PointKeyFrameCollection.cs
- WindowShowOrOpenTracker.cs
- ListView.cs
- WsatServiceCertificate.cs
- RuntimeConfig.cs
- UnsafeNativeMethods.cs
- StrongNameIdentityPermission.cs
- Rotation3DAnimation.cs
- ConfigXmlCDataSection.cs
- GridItem.cs
- XmlDataImplementation.cs
- DictionarySectionHandler.cs
- WorkflowTimerService.cs
- HtmlTable.cs
- ComplexType.cs
- _TransmitFileOverlappedAsyncResult.cs
- NetNamedPipeSecurityElement.cs
- AutomationPeer.cs
- DbDataReader.cs
- WebCategoryAttribute.cs
- AppSettingsExpressionBuilder.cs
- ParallelTimeline.cs
- GridViewRowCollection.cs
- PointUtil.cs
- ResourceDictionaryCollection.cs
- ThreadInterruptedException.cs
- WebServiceErrorEvent.cs
- DynamicResourceExtension.cs
- sqlmetadatafactory.cs
- ValidationResult.cs
- XmlSecureResolver.cs
- BStrWrapper.cs
- HtmlFormAdapter.cs
- DiffuseMaterial.cs
- ValidationEventArgs.cs
- AliasExpr.cs
- ProfilePropertyNameValidator.cs
- ConfigDefinitionUpdates.cs
- XPathNodeInfoAtom.cs
- XmlWrappingWriter.cs
- Hyperlink.cs
- ActivityDelegate.cs
- SourceFileInfo.cs
- OracleBFile.cs
- WorkflowWebHostingModule.cs
- GridViewDeleteEventArgs.cs
- SchemaImporter.cs
- ConnectionPoint.cs
- DefaultTextStoreTextComposition.cs
- HScrollProperties.cs
- Transform.cs
- TypeDelegator.cs
- ICollection.cs
- NumericExpr.cs
- TypeUnloadedException.cs
- Types.cs
- ToggleProviderWrapper.cs
- CodeArrayIndexerExpression.cs
- UrlParameterReader.cs
- MessageBox.cs
- AppearanceEditorPart.cs
- BmpBitmapDecoder.cs
- DataColumnCollection.cs
- InputMethod.cs
- CharacterHit.cs
- PaginationProgressEventArgs.cs
- MetadataFile.cs
- LifetimeServices.cs
- SevenBitStream.cs
- IPCCacheManager.cs
- DateTimeParse.cs
- TypeLoadException.cs
- FilteredAttributeCollection.cs
- elementinformation.cs
- IdleTimeoutMonitor.cs
- InputBuffer.cs
- DBConnection.cs
- DeferredBinaryDeserializerExtension.cs
- ScriptIgnoreAttribute.cs
- externdll.cs