Code:
/ DotNET / DotNET / 8.0 / untmp / Orcas / RTM / ndp / fx / src / xsp / System / Web / Extensions / ui / ScriptBehaviorDescriptor.cs / 1 / ScriptBehaviorDescriptor.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI { using System; using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Security.Permissions; using System.Web; using System.Web.Resources; [ AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal), AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal) ] public class ScriptBehaviorDescriptor : ScriptComponentDescriptor { private string _name; public ScriptBehaviorDescriptor(string type, string elementID) : base(type, elementID) { RegisterDispose = false; } public override string ClientID { get { if (String.IsNullOrEmpty(ID)) { Debug.Assert(!String.IsNullOrEmpty(ElementID), "Base ctor ensures ElementID is not null or empty"); return ElementID + "$" + Name; } else { return ID; } } } [SuppressMessage("Microsoft.Naming", "CA1706:ShortAcronymsShouldBeUppercase")] public string ElementID { get { return base.ElementIDInternal; } } public string Name { get { if (String.IsNullOrEmpty(_name)) { return GetTypeName(this.Type); } else { return _name; } } set { _name = value; } } // Returns the short name of a possibly namespace-qualified type name. // Examples: // "TestNS1.TestNS2.TestType" -> "TestType" // "TestType" -> "TestType" private static string GetTypeName(string type) { int index = type.LastIndexOf('.'); if (index == -1) { return type; } else { return type.Substring(index + 1); } } protected internal override string GetScript() { if (!String.IsNullOrEmpty(_name)) { AddProperty("name", _name); } return base.GetScript(); } } } // 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
- UIElementCollection.cs
- PartialArray.cs
- HttpResponse.cs
- SectionInput.cs
- XmlReturnWriter.cs
- EditingMode.cs
- ServiceBehaviorElementCollection.cs
- PagesSection.cs
- KnownTypesHelper.cs
- ListItemConverter.cs
- UniqueTransportManagerRegistration.cs
- Enlistment.cs
- CustomAttributeSerializer.cs
- Tracking.cs
- GuidConverter.cs
- IisTraceWebEventProvider.cs
- XPathDocumentNavigator.cs
- Int32CollectionValueSerializer.cs
- ForAllOperator.cs
- SelectedGridItemChangedEvent.cs
- LineProperties.cs
- DecimalAnimationBase.cs
- CompositionCommandSet.cs
- BaseResourcesBuildProvider.cs
- ResourceDescriptionAttribute.cs
- PropertyGroupDescription.cs
- CommonObjectSecurity.cs
- MethodImplAttribute.cs
- TypeDelegator.cs
- DebugController.cs
- LinkDescriptor.cs
- PngBitmapDecoder.cs
- AuthenticationManager.cs
- XmlMembersMapping.cs
- DiscardableAttribute.cs
- SubclassTypeValidatorAttribute.cs
- DataBoundControl.cs
- MergablePropertyAttribute.cs
- LoginUtil.cs
- DataTrigger.cs
- DataGridViewCheckBoxCell.cs
- AuditLog.cs
- QuerySafeNavigator.cs
- FormsAuthenticationUserCollection.cs
- SizeConverter.cs
- DataGridViewCellStyleChangedEventArgs.cs
- LinqDataSourceValidationException.cs
- CalendarTable.cs
- DateTimeSerializationSection.cs
- EasingKeyFrames.cs
- AuthenticationConfig.cs
- ImportCatalogPart.cs
- SafeReadContext.cs
- LayoutUtils.cs
- ParserOptions.cs
- HtmlInputRadioButton.cs
- RoleManagerModule.cs
- Model3DGroup.cs
- MergePropertyDescriptor.cs
- ApplicationBuildProvider.cs
- Point.cs
- TreeNodeBindingCollection.cs
- TypeToken.cs
- InputScope.cs
- NetMsmqSecurityMode.cs
- RepeatBehaviorConverter.cs
- ConnectionManagementElementCollection.cs
- FixedDocument.cs
- TextDecorations.cs
- CodeGroup.cs
- BlurBitmapEffect.cs
- DesignerActionVerbItem.cs
- RightsManagementLicense.cs
- _UriTypeConverter.cs
- XmlAttributeProperties.cs
- SpecularMaterial.cs
- BackStopAuthenticationModule.cs
- WindowsListView.cs
- IisTraceListener.cs
- CacheAxisQuery.cs
- TypefaceMetricsCache.cs
- CommandLibraryHelper.cs
- FontDialog.cs
- OLEDB_Enum.cs
- TdsEnums.cs
- DBCSCodePageEncoding.cs
- ListBase.cs
- httpstaticobjectscollection.cs
- SqlUdtInfo.cs
- VariantWrapper.cs
- ConfigurationUtility.cs
- CounterCreationData.cs
- ProjectionPlan.cs
- ReflectionHelper.cs
- ModuleBuilder.cs
- LayoutDump.cs
- DataConnectionHelper.cs
- TraceUtils.cs
- PnrpPermission.cs
- XmlQualifiedName.cs