Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SafeCryptContextHandle.cs
- BaseResourcesBuildProvider.cs
- CodeBlockBuilder.cs
- SiteMapDataSourceDesigner.cs
- DesignerObjectListAdapter.cs
- XmlNodeWriter.cs
- WorkflowTimerService.cs
- FilterableAttribute.cs
- Rect3DConverter.cs
- TextElementEditingBehaviorAttribute.cs
- RowToParametersTransformer.cs
- BuildResult.cs
- Cursor.cs
- TextShapeableCharacters.cs
- TemplateXamlParser.cs
- SchemaTableColumn.cs
- NodeLabelEditEvent.cs
- ContractNamespaceAttribute.cs
- XmlExceptionHelper.cs
- BooleanKeyFrameCollection.cs
- PropertyGrid.cs
- DetailsViewRowCollection.cs
- UnsafeNativeMethods.cs
- StylusPointProperty.cs
- TypeUtil.cs
- WebPartManager.cs
- ShapingWorkspace.cs
- PropertyRef.cs
- StdValidatorsAndConverters.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- ThrowHelper.cs
- BindToObject.cs
- Comparer.cs
- SchemaTypeEmitter.cs
- XmlSchemaAnyAttribute.cs
- ObjectTag.cs
- BindingSourceDesigner.cs
- BinaryFormatter.cs
- ExpressionNormalizer.cs
- SchemaImporterExtensionElement.cs
- EntityDataSourceColumn.cs
- OleDbConnection.cs
- _Events.cs
- DesignerMetadata.cs
- HtmlTitle.cs
- RemoteCryptoTokenProvider.cs
- URLAttribute.cs
- RenamedEventArgs.cs
- TextBounds.cs
- AlternateViewCollection.cs
- RtfToken.cs
- SettingsSection.cs
- TextServicesHost.cs
- PropertyTabChangedEvent.cs
- ForceCopyBuildProvider.cs
- SqlBulkCopyColumnMapping.cs
- InvalidPropValue.cs
- FindProgressChangedEventArgs.cs
- TypefaceMap.cs
- WorkflowInstance.cs
- SafeFileMapViewHandle.cs
- DataListAutoFormat.cs
- TableRowCollection.cs
- SessionEndingCancelEventArgs.cs
- SqlDataSourceTableQuery.cs
- TemplatePropertyEntry.cs
- PropertyGridEditorPart.cs
- OleDbRowUpdatedEvent.cs
- OutputCacheSettings.cs
- OpacityConverter.cs
- VideoDrawing.cs
- ToolZoneDesigner.cs
- DataGridViewTopRowAccessibleObject.cs
- EventProviderClassic.cs
- GPPOINTF.cs
- TableRowsCollectionEditor.cs
- SqlFlattener.cs
- DrawingContextDrawingContextWalker.cs
- ExecutionContext.cs
- CodeCompileUnit.cs
- SmtpFailedRecipientsException.cs
- KeyValuePairs.cs
- RadioButton.cs
- ToolboxItemImageConverter.cs
- _AutoWebProxyScriptWrapper.cs
- ToolStripPanel.cs
- BaseTemplateCodeDomTreeGenerator.cs
- LayoutEvent.cs
- WebPartsPersonalization.cs
- ReflectTypeDescriptionProvider.cs
- Ray3DHitTestResult.cs
- SessionEndedEventArgs.cs
- DataSourceXmlClassAttribute.cs
- DataSourceCacheDurationConverter.cs
- Win32Native.cs
- CultureInfo.cs
- EntityDataSourceState.cs
- KeyedPriorityQueue.cs
- Cursor.cs
- TemplateNameScope.cs