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
- HTMLTagNameToTypeMapper.cs
- WindowsRichEdit.cs
- columnmapfactory.cs
- DllNotFoundException.cs
- DoubleIndependentAnimationStorage.cs
- SqlDataSourceAdvancedOptionsForm.cs
- COM2PictureConverter.cs
- InstalledVoice.cs
- LoginUtil.cs
- XmlMembersMapping.cs
- ContentPresenter.cs
- ProcessHostServerConfig.cs
- OdbcConnectionHandle.cs
- ADMembershipProvider.cs
- EntityViewContainer.cs
- NetworkStream.cs
- GridViewDeletedEventArgs.cs
- OracleDateTime.cs
- CellTreeSimplifier.cs
- BitmapImage.cs
- SqlDataSourceCustomCommandEditor.cs
- Propagator.JoinPropagator.cs
- MemberPathMap.cs
- SpecularMaterial.cs
- ResponseStream.cs
- RectAnimationUsingKeyFrames.cs
- ProtocolException.cs
- SmtpNtlmAuthenticationModule.cs
- CodeVariableReferenceExpression.cs
- AppliedDeviceFiltersDialog.cs
- ColorMap.cs
- StatusBarDesigner.cs
- ParagraphVisual.cs
- MSAAEventDispatcher.cs
- XPathNodeInfoAtom.cs
- DesignBindingEditor.cs
- PathSegment.cs
- DesignerHelpers.cs
- PropertyItem.cs
- LoopExpression.cs
- CssClassPropertyAttribute.cs
- NCryptNative.cs
- MouseButtonEventArgs.cs
- Signature.cs
- CodeMethodInvokeExpression.cs
- SecurityRuntime.cs
- ParserOptions.cs
- NamespaceList.cs
- Pen.cs
- EncodingNLS.cs
- TextTreeFixupNode.cs
- TraceSection.cs
- InfoCardRSAPKCS1KeyExchangeFormatter.cs
- DescendentsWalkerBase.cs
- CustomAttributeBuilder.cs
- Boolean.cs
- HttpPostClientProtocol.cs
- WindowsListView.cs
- NativeMethods.cs
- InternalControlCollection.cs
- ParameterToken.cs
- SharedPersonalizationStateInfo.cs
- XPathItem.cs
- Activity.cs
- ThreadSafeList.cs
- Icon.cs
- TimeoutException.cs
- DataGridItem.cs
- PackageRelationship.cs
- WindowsAltTab.cs
- COM2FontConverter.cs
- EventHandlerList.cs
- ScriptDescriptor.cs
- FilterableAttribute.cs
- DataObjectMethodAttribute.cs
- TraceContextEventArgs.cs
- ZipIOLocalFileHeader.cs
- DriveNotFoundException.cs
- EndEvent.cs
- MergeFailedEvent.cs
- LayoutUtils.cs
- WindowsRegion.cs
- RepeaterCommandEventArgs.cs
- WinInet.cs
- XmlReflectionImporter.cs
- ConnectionStringsSection.cs
- VisualState.cs
- GridViewCommandEventArgs.cs
- XappLauncher.cs
- WindowsToolbarItemAsMenuItem.cs
- SerialStream.cs
- DataServiceOperationContext.cs
- ThicknessAnimation.cs
- DefaultPrintController.cs
- DetailsViewRowCollection.cs
- WinEventHandler.cs
- DataContractSet.cs
- TransactionTraceIdentifier.cs
- XPathDocumentNavigator.cs
- AssociationType.cs