Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / 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; } } } // 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
- WindowProviderWrapper.cs
- XmlSchemaException.cs
- ScriptIgnoreAttribute.cs
- KeyValueInternalCollection.cs
- XmlWriterTraceListener.cs
- ViewBase.cs
- HMACSHA1.cs
- BitmapMetadata.cs
- ParsedAttributeCollection.cs
- SpinLock.cs
- XPathSelectionIterator.cs
- StrokeCollectionConverter.cs
- StylusPointCollection.cs
- PageBuildProvider.cs
- WebCategoryAttribute.cs
- LostFocusEventManager.cs
- WebBrowserProgressChangedEventHandler.cs
- Panel.cs
- IpcChannel.cs
- WebPartAddingEventArgs.cs
- OutOfProcStateClientManager.cs
- GenericTextProperties.cs
- Marshal.cs
- ObjectIDGenerator.cs
- IResourceProvider.cs
- NavigationPropertyEmitter.cs
- GeneralTransformCollection.cs
- BrowserDefinition.cs
- BamlStream.cs
- WebDisplayNameAttribute.cs
- PageAdapter.cs
- ConstraintCollection.cs
- SessionStateContainer.cs
- RadioButtonAutomationPeer.cs
- NavigationFailedEventArgs.cs
- GridViewDeleteEventArgs.cs
- TextTreeInsertUndoUnit.cs
- ActiveXSite.cs
- Geometry3D.cs
- SqlInternalConnection.cs
- SiteMapNodeItemEventArgs.cs
- Encoder.cs
- PresentationAppDomainManager.cs
- BuildTopDownAttribute.cs
- LiteralLink.cs
- IndentedTextWriter.cs
- CapabilitiesRule.cs
- EdmProviderManifest.cs
- CompositeDataBoundControl.cs
- EnumConverter.cs
- BinaryReader.cs
- NumberAction.cs
- MergeFilterQuery.cs
- WebPartHeaderCloseVerb.cs
- Script.cs
- ImageSourceValueSerializer.cs
- ObjectDataSourceMethodEventArgs.cs
- WindowsListViewItemStartMenu.cs
- Timer.cs
- DataGridViewTopLeftHeaderCell.cs
- SqlTypeSystemProvider.cs
- TrustSection.cs
- GridViewDeletedEventArgs.cs
- DataListItem.cs
- MetaForeignKeyColumn.cs
- CLRBindingWorker.cs
- ListControl.cs
- ApplyTemplatesAction.cs
- ApplicationServicesHostFactory.cs
- FtpRequestCacheValidator.cs
- AutoCompleteStringCollection.cs
- ToolbarAUtomationPeer.cs
- SmiEventStream.cs
- MediaContext.cs
- EdmConstants.cs
- ToolStripHighContrastRenderer.cs
- XmlSchemaNotation.cs
- ProcessThread.cs
- Matrix.cs
- ByteFacetDescriptionElement.cs
- MethodBuilderInstantiation.cs
- DesignerActionUIService.cs
- MemberMaps.cs
- Substitution.cs
- OracleCommandBuilder.cs
- LogLogRecord.cs
- _UriSyntax.cs
- SelfIssuedAuthRSAPKCS1SignatureFormatter.cs
- XhtmlBasicValidationSummaryAdapter.cs
- XamlReaderHelper.cs
- TransactionState.cs
- GeometryValueSerializer.cs
- MobileRedirect.cs
- BlurBitmapEffect.cs
- ExcCanonicalXml.cs
- Rethrow.cs
- ArraySubsetEnumerator.cs
- HeaderedItemsControl.cs
- CodeTypeMember.cs
- BlobPersonalizationState.cs