Code:
/ FX-1434 / FX-1434 / 1.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
- Tablet.cs
- ToolStripProgressBar.cs
- Update.cs
- GZipStream.cs
- XmlNode.cs
- DefaultValueConverter.cs
- MetadataItem.cs
- DateTimeConverter2.cs
- ShapeTypeface.cs
- LogLogRecord.cs
- StyleXamlParser.cs
- TextEffect.cs
- XmlDigitalSignatureProcessor.cs
- SystemIPv6InterfaceProperties.cs
- _BufferOffsetSize.cs
- QueryOperator.cs
- CodeArgumentReferenceExpression.cs
- Point3DAnimationBase.cs
- X509CertificateClaimSet.cs
- ChangeInterceptorAttribute.cs
- CommonRemoteMemoryBlock.cs
- SimpleExpression.cs
- wpf-etw.cs
- DialogResultConverter.cs
- DtcInterfaces.cs
- RefreshResponseInfo.cs
- RectangleF.cs
- SecurityContext.cs
- ButtonColumn.cs
- ListSourceHelper.cs
- RuleInfoComparer.cs
- SafeNativeMethods.cs
- TypeUtil.cs
- Drawing.cs
- TextComposition.cs
- ServiceContractViewControl.cs
- brushes.cs
- CorrelationTokenTypeConvertor.cs
- CodeDirectionExpression.cs
- TextElementCollectionHelper.cs
- PieceDirectory.cs
- ResXBuildProvider.cs
- Membership.cs
- CommandID.cs
- SignatureHelper.cs
- OleDbConnection.cs
- TextPattern.cs
- DbDataRecord.cs
- basevalidator.cs
- WeakReferenceList.cs
- smtppermission.cs
- MULTI_QI.cs
- ObjectQueryExecutionPlan.cs
- DrawingContext.cs
- DataGridViewSelectedRowCollection.cs
- Win32Native.cs
- DataView.cs
- EntitySetDataBindingList.cs
- WebPartZoneBase.cs
- MarshalByValueComponent.cs
- DataGridView.cs
- NameTable.cs
- RootProfilePropertySettingsCollection.cs
- HitTestWithGeometryDrawingContextWalker.cs
- ImportedPolicyConversionContext.cs
- SignatureToken.cs
- X509WindowsSecurityToken.cs
- StatusBarPanelClickEvent.cs
- SingleTagSectionHandler.cs
- TemplatePagerField.cs
- ToolStripEditorManager.cs
- UIPropertyMetadata.cs
- TextEncodedRawTextWriter.cs
- TextEncodedRawTextWriter.cs
- EntityDataSourceReferenceGroup.cs
- PaperSize.cs
- Lasso.cs
- CheckBoxPopupAdapter.cs
- DocumentApplicationState.cs
- AttributeTableBuilder.cs
- WebServiceClientProxyGenerator.cs
- DataGridViewSelectedRowCollection.cs
- FixedSOMTextRun.cs
- HtmlFormWrapper.cs
- ProviderManager.cs
- SelectionEditor.cs
- DictionarySurrogate.cs
- ContainerCodeDomSerializer.cs
- GradientStop.cs
- HandlerBase.cs
- ComboBoxRenderer.cs
- SqlUserDefinedAggregateAttribute.cs
- Schedule.cs
- ValidationSummary.cs
- Point.cs
- DefaultValueConverter.cs
- ObjectDataSourceFilteringEventArgs.cs
- OdbcDataReader.cs
- FocusTracker.cs
- SapiRecognizer.cs