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
- BufferModeSettings.cs
- GenericQueueSurrogate.cs
- VisemeEventArgs.cs
- EncoderReplacementFallback.cs
- OperationSelectorBehavior.cs
- XmlAggregates.cs
- IndexedString.cs
- UnsafePeerToPeerMethods.cs
- Delay.cs
- ToolStripItemRenderEventArgs.cs
- DataGridViewComboBoxCell.cs
- ItemsPanelTemplate.cs
- GPPOINT.cs
- PreviewControlDesigner.cs
- PolicyManager.cs
- DependencyProperty.cs
- _CommandStream.cs
- SerializationEventsCache.cs
- WpfKnownMemberInvoker.cs
- TextRangeEditLists.cs
- SizeF.cs
- InProcStateClientManager.cs
- StrokeNodeEnumerator.cs
- DataKeyArray.cs
- ModuleConfigurationInfo.cs
- SystemFonts.cs
- StartFileNameEditor.cs
- BasicHttpMessageSecurity.cs
- XmlArrayItemAttribute.cs
- BatchWriter.cs
- EmptyElement.cs
- Underline.cs
- Wizard.cs
- WindowsFormsEditorServiceHelper.cs
- CreateUserWizardStep.cs
- shaperfactory.cs
- ExtensionSimplifierMarkupObject.cs
- XPathArrayIterator.cs
- HttpHostedTransportConfiguration.cs
- AspNetCompatibilityRequirementsMode.cs
- WebServiceResponseDesigner.cs
- ExtendedProtectionPolicyElement.cs
- ETagAttribute.cs
- ControlCodeDomSerializer.cs
- PanelDesigner.cs
- DelegateTypeInfo.cs
- CfgParser.cs
- GeneralTransform3DCollection.cs
- RectConverter.cs
- FilePresentation.cs
- RootBrowserWindow.cs
- CodeCastExpression.cs
- SimplePropertyEntry.cs
- PenThread.cs
- FontStyles.cs
- BindingCollection.cs
- SafeFileMappingHandle.cs
- AxHost.cs
- TimeSpanValidator.cs
- ApplicationCommands.cs
- UTF7Encoding.cs
- RequiredFieldValidator.cs
- MinMaxParagraphWidth.cs
- WebServiceData.cs
- IgnoreSectionHandler.cs
- ServiceHostFactory.cs
- RectKeyFrameCollection.cs
- CommentEmitter.cs
- Regex.cs
- NativeMethods.cs
- categoryentry.cs
- SystemSounds.cs
- DependencyPropertyDescriptor.cs
- Section.cs
- UTF32Encoding.cs
- ShapingEngine.cs
- GregorianCalendar.cs
- SqlProfileProvider.cs
- GroupDescription.cs
- NativeObjectSecurity.cs
- FileUpload.cs
- BookmarkEventArgs.cs
- PerformanceCounterLib.cs
- PointHitTestResult.cs
- StringTraceRecord.cs
- VisualBrush.cs
- Win32Native.cs
- ToolStripDropDownButton.cs
- CustomTypeDescriptor.cs
- SqlTransaction.cs
- ActivityExecutor.cs
- ExitEventArgs.cs
- RecordBuilder.cs
- DateTimeConverter.cs
- XmlCodeExporter.cs
- DbDataAdapter.cs
- DataGridLinkButton.cs
- BindingExpression.cs
- ExpressionBinding.cs
- PolicyException.cs