Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebControls / RouteParameter.cs / 1305376 / RouteParameter.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; using System.Web.Routing; ////// Represents a Parameter that gets its value from the application's route data. /// [ DefaultProperty("RouteKey"), ] public class RouteParameter : Parameter { ////// Creates an instance of the RouteParameter class. /// public RouteParameter() { } ////// Creates an instance of the RouteParameter class with the specified parameter name and request field. /// public RouteParameter(string name, string routeKey) : base(name) { RouteKey = routeKey; } ////// Creates an instance of the routeParameter class with the specified parameter name, database type, and /// request field. /// public RouteParameter(string name, DbType dbType, string routeKey) : base(name, dbType) { RouteKey = routeKey; } ////// Creates an instance of the RouteParameter class with the specified parameter name, type, and request field. /// public RouteParameter(string name, TypeCode type, string routeKey) : base(name, type) { RouteKey = routeKey; } ////// Used to clone a parameter. /// protected RouteParameter(RouteParameter original) : base(original) { RouteKey = original.RouteKey; } ////// The name of the route value to get the value from. /// [ DefaultValue(""), WebCategory("Parameter"), WebSysDescription(SR.RouteParameter_RouteKey), ] public string RouteKey { get { object o = ViewState["RouteKey"]; if (o == null) return String.Empty; return (string)o; } set { if (RouteKey != value) { ViewState["RouteKey"] = value; OnParameterChanged(); } } } ////// Creates a new RouteParameter that is a copy of this RouteParameter. /// protected override Parameter Clone() { return new RouteParameter(this); } ////// Returns the updated value of the parameter. /// protected internal override object Evaluate(HttpContext context, Control control) { if (context == null || context.Request == null || control == null) { return null; } RouteData routeData = control.Page.RouteData; if (routeData == null) { return null; } return routeData.Values[RouteKey]; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XmlSchemaValidationException.cs
- DataServiceKeyAttribute.cs
- Selection.cs
- RuleSetCollection.cs
- TraceInternal.cs
- ZipIOExtraFieldElement.cs
- SqlUtil.cs
- EmptyStringExpandableObjectConverter.cs
- BrowsableAttribute.cs
- SqlInternalConnectionTds.cs
- WebPartConnectionsCancelVerb.cs
- _NTAuthentication.cs
- AdornerDecorator.cs
- VerificationAttribute.cs
- TemplateControl.cs
- TemplateBuilder.cs
- Line.cs
- CounterSampleCalculator.cs
- DataGridViewColumnEventArgs.cs
- GenericEnumerator.cs
- BrowserDefinitionCollection.cs
- ProcessModule.cs
- HashAlgorithm.cs
- PersistChildrenAttribute.cs
- EventLogWatcher.cs
- SmiTypedGetterSetter.cs
- XmlHierarchyData.cs
- BaseCollection.cs
- _LoggingObject.cs
- ClientSideQueueItem.cs
- DataListGeneralPage.cs
- ResXResourceSet.cs
- ScrollData.cs
- ConnectionsZoneDesigner.cs
- ContentTextAutomationPeer.cs
- counter.cs
- ErrorHandler.cs
- BuilderInfo.cs
- SqlMultiplexer.cs
- BaseValidator.cs
- PageCache.cs
- ObjectDataSourceMethodEditor.cs
- IdleTimeoutMonitor.cs
- AuthenticationModulesSection.cs
- Avt.cs
- SafeReversePInvokeHandle.cs
- StateRuntime.cs
- SqlDataSourceStatusEventArgs.cs
- XmlSchemaObjectTable.cs
- ResourceReader.cs
- XamlReader.cs
- Transform3DGroup.cs
- SmiGettersStream.cs
- JoinSymbol.cs
- HierarchicalDataBoundControlAdapter.cs
- UserMapPath.cs
- METAHEADER.cs
- FileVersionInfo.cs
- Command.cs
- FixedSOMLineCollection.cs
- RowSpanVector.cs
- SingleAnimation.cs
- NegotiationTokenAuthenticator.cs
- MulticastDelegate.cs
- ColumnWidthChangedEvent.cs
- CountdownEvent.cs
- CompositeDesignerAccessibleObject.cs
- UnsafePeerToPeerMethods.cs
- DesignerGenericWebPart.cs
- StringPropertyBuilder.cs
- WebControlAdapter.cs
- MetafileHeader.cs
- LabelEditEvent.cs
- TypeSemantics.cs
- TcpTransportManager.cs
- DataMember.cs
- SoundPlayer.cs
- LiteralSubsegment.cs
- UnionExpr.cs
- ListBindingConverter.cs
- RequiredFieldValidator.cs
- ImageMetadata.cs
- BitmapDecoder.cs
- Journal.cs
- IsolatedStoragePermission.cs
- ReadOnlyPermissionSet.cs
- EntityModelBuildProvider.cs
- StringArrayConverter.cs
- SamlEvidence.cs
- Parameter.cs
- PolyLineSegmentFigureLogic.cs
- AppLevelCompilationSectionCache.cs
- ContainsRowNumberChecker.cs
- CodeDOMUtility.cs
- PreApplicationStartMethodAttribute.cs
- DependencyPropertyKind.cs
- StreamReader.cs
- DataGridViewImageCell.cs
- DataTemplateSelector.cs
- ListViewPagedDataSource.cs