Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / UI / UrlPropertyAttribute.cs / 1 / UrlPropertyAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI { using System; using System.ComponentModel; using System.Security.Permissions; using System.Web.Util; // An UrlPropertyAttribute metadata attribute can be applied to string // properties that contain URL values. // This can be used to identify URLs which allows design-time functionality and runtime // functionality to do interesting things with the property values. [AttributeUsage(AttributeTargets.Property)] [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] public sealed class UrlPropertyAttribute : Attribute { private string _filter; // Used to mark a property as an URL. public UrlPropertyAttribute() : this("*.*") { } // Used to mark a property as an URL. In addition, the type of files allowed // can be specified. This can be used at design-time to customize the URL picker. public UrlPropertyAttribute(string filter) { if(filter == null) { _filter = "*.*"; } else { _filter = filter; } } // The file filter associated with the URL property. This takes // the form of a file filter string typically used with Open File // dialogs. The default is *.*, so all file types can be chosen. public string Filter { get { return _filter; } } public override int GetHashCode() { return Filter.GetHashCode(); } public override bool Equals(object obj) { if (obj == this) { return true; } UrlPropertyAttribute other = obj as UrlPropertyAttribute; if (other != null) { return Filter.Equals(other.Filter); } return false; } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- EmptyEnumerator.cs
- GridViewColumnCollection.cs
- ScriptRef.cs
- HttpApplication.cs
- TabletCollection.cs
- AccessDataSourceWizardForm.cs
- ComponentDispatcher.cs
- WebPartMenuStyle.cs
- HtmlShimManager.cs
- DefaultSection.cs
- LocalizedNameDescriptionPair.cs
- DataColumnCollection.cs
- RectangleGeometry.cs
- TcpPortSharing.cs
- Transform.cs
- SqlMultiplexer.cs
- ObjectSet.cs
- ActivityDesignerHighlighter.cs
- HandlerBase.cs
- GroupQuery.cs
- KeyPullup.cs
- DateTimeOffsetAdapter.cs
- DataObject.cs
- ListBase.cs
- DataBindingValueUIHandler.cs
- DebugHandleTracker.cs
- CommentEmitter.cs
- ValidatorUtils.cs
- ProviderConnectionPointCollection.cs
- InlineCollection.cs
- SqlDataSource.cs
- PropertyGridCommands.cs
- FastEncoder.cs
- Animatable.cs
- SqlExpressionNullability.cs
- HttpCacheVaryByContentEncodings.cs
- DrawingGroupDrawingContext.cs
- SchemaHelper.cs
- CroppedBitmap.cs
- MailDefinition.cs
- BaseDataListActionList.cs
- sqlcontext.cs
- WmlTextViewAdapter.cs
- hwndwrapper.cs
- Int32KeyFrameCollection.cs
- GeneralTransform2DTo3DTo2D.cs
- StringFormat.cs
- HtmlLink.cs
- CodeExpressionCollection.cs
- MaterializeFromAtom.cs
- UnsafeNativeMethodsMilCoreApi.cs
- PasswordDeriveBytes.cs
- ConsumerConnectionPoint.cs
- Window.cs
- TreeNodeCollection.cs
- SqlProcedureAttribute.cs
- CompiledRegexRunnerFactory.cs
- OdbcError.cs
- AndCondition.cs
- DBConcurrencyException.cs
- ContextQuery.cs
- DoubleCollectionValueSerializer.cs
- DataReaderContainer.cs
- GAC.cs
- StructuralObject.cs
- UdpAnnouncementEndpoint.cs
- HttpConfigurationContext.cs
- EventListenerClientSide.cs
- HttpBrowserCapabilitiesWrapper.cs
- NotificationContext.cs
- XmlHierarchicalDataSourceView.cs
- SqlError.cs
- DerivedKeySecurityTokenStub.cs
- MdImport.cs
- StylusSystemGestureEventArgs.cs
- SafeSystemMetrics.cs
- AssemblyName.cs
- DoubleSumAggregationOperator.cs
- WebPartConnectionsCloseVerb.cs
- HttpSocketManager.cs
- GridViewRowPresenter.cs
- CodeExpressionStatement.cs
- PropertySet.cs
- TrackPoint.cs
- ProviderBase.cs
- NativeMethodsCLR.cs
- BuildDependencySet.cs
- XmlSchemaAppInfo.cs
- WebPartTransformerAttribute.cs
- Schema.cs
- ReadOnlyTernaryTree.cs
- ErrorInfoXmlDocument.cs
- XmlSchemas.cs
- InvalidDataException.cs
- TextAutomationPeer.cs
- ExtentJoinTreeNode.cs
- DataGridTextColumn.cs
- SynchronizedInputAdaptor.cs
- WorkflowMessageEventArgs.cs
- DLinqTableProvider.cs