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
- RegexBoyerMoore.cs
- XmlNode.cs
- CompositeActivityTypeDescriptor.cs
- EventDriven.cs
- StringAnimationBase.cs
- PartialCachingControl.cs
- PeerNeighborManager.cs
- ModelMemberCollection.cs
- HashMembershipCondition.cs
- CookieProtection.cs
- TraceHandlerErrorFormatter.cs
- TemplateInstanceAttribute.cs
- PartialCachingControl.cs
- DocumentSequence.cs
- _IPv6Address.cs
- _TimerThread.cs
- DbExpressionVisitor.cs
- HorizontalAlignConverter.cs
- TaskFormBase.cs
- JsonWriter.cs
- WebResponse.cs
- DataPager.cs
- MenuItemCollection.cs
- DataGridViewRow.cs
- DataPagerField.cs
- RtfToXamlReader.cs
- UntrustedRecipientException.cs
- _LocalDataStoreMgr.cs
- SiteMapDataSource.cs
- CompoundFileReference.cs
- UserControlBuildProvider.cs
- CompModSwitches.cs
- SafeNativeMethodsCLR.cs
- GZipDecoder.cs
- FontUnit.cs
- DateTimeOffsetStorage.cs
- XmlSchemaProviderAttribute.cs
- OptimizedTemplateContent.cs
- FontFamilyIdentifier.cs
- DataGridRowsPresenter.cs
- CachedBitmap.cs
- PolicyStatement.cs
- HtmlTableRow.cs
- XmlSchemaResource.cs
- DeviceSpecificChoiceCollection.cs
- DbgUtil.cs
- GeneralTransform3DGroup.cs
- SemanticResolver.cs
- Environment.cs
- FixUp.cs
- FeatureSupport.cs
- InfoCardSymmetricCrypto.cs
- DataViewSettingCollection.cs
- ValidatorCompatibilityHelper.cs
- CodeMethodInvokeExpression.cs
- DisplayNameAttribute.cs
- XmlIlVisitor.cs
- InitializerFacet.cs
- BitmapCodecInfo.cs
- XhtmlStyleClass.cs
- PermissionToken.cs
- BindableTemplateBuilder.cs
- SmiContext.cs
- MdiWindowListStrip.cs
- CryptoSession.cs
- MergeFailedEvent.cs
- PagedDataSource.cs
- CorruptingExceptionCommon.cs
- BitmapEffectGroup.cs
- ProviderConnectionPointCollection.cs
- COAUTHINFO.cs
- Int32RectConverter.cs
- SHA256Managed.cs
- SqlFileStream.cs
- CommandBinding.cs
- DynamicActionMessageFilter.cs
- SQLBytes.cs
- DataGridViewCellValueEventArgs.cs
- CrossSiteScriptingValidation.cs
- _BufferOffsetSize.cs
- EntityDataSourceWrapperCollection.cs
- SettingsPropertyIsReadOnlyException.cs
- FormViewInsertEventArgs.cs
- NativeMethods.cs
- FixedSOMTable.cs
- VSWCFServiceContractGenerator.cs
- RegionData.cs
- UpdateExpressionVisitor.cs
- InternalSafeNativeMethods.cs
- SymmetricAlgorithm.cs
- Bezier.cs
- RelatedEnd.cs
- sqlpipe.cs
- _Rfc2616CacheValidators.cs
- TrustManagerMoreInformation.cs
- SimpleMailWebEventProvider.cs
- XmlNodeComparer.cs
- OleDbParameter.cs
- RelationshipConverter.cs
- SystemIcons.cs