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
- EdmScalarPropertyAttribute.cs
- LexicalChunk.cs
- TransformedBitmap.cs
- XmlNamespaceDeclarationsAttribute.cs
- Type.cs
- ExpandSegmentCollection.cs
- Empty.cs
- PathData.cs
- TreeViewHitTestInfo.cs
- FileIOPermission.cs
- XmlChildEnumerator.cs
- AssemblyHash.cs
- versioninfo.cs
- Stroke.cs
- RIPEMD160Managed.cs
- NumericUpDownAccelerationCollection.cs
- SmiSettersStream.cs
- wmiprovider.cs
- ConfigPathUtility.cs
- TextBreakpoint.cs
- ContainerControl.cs
- NodeLabelEditEvent.cs
- HandlerFactoryCache.cs
- _ConnectOverlappedAsyncResult.cs
- WeakReferenceEnumerator.cs
- XmlCountingReader.cs
- _AcceptOverlappedAsyncResult.cs
- DebuggerAttributes.cs
- GeneralTransformGroup.cs
- ThousandthOfEmRealPoints.cs
- RenderingEventArgs.cs
- PeerContact.cs
- CallSite.cs
- DataPagerField.cs
- AutomationTextAttribute.cs
- ExtendedPropertiesHandler.cs
- Perspective.cs
- ScriptResourceAttribute.cs
- GPStream.cs
- Boolean.cs
- WebBrowsableAttribute.cs
- DelegatingTypeDescriptionProvider.cs
- XamlFilter.cs
- DataGridCellAutomationPeer.cs
- RealProxy.cs
- KeyedHashAlgorithm.cs
- DEREncoding.cs
- WebPartEditVerb.cs
- SqlTransaction.cs
- UpdateException.cs
- Panel.cs
- TextTreeRootTextBlock.cs
- ProfileProvider.cs
- CachedFontFamily.cs
- Link.cs
- TextFormattingConverter.cs
- SelectionProcessor.cs
- cookieexception.cs
- SourceChangedEventArgs.cs
- SwitchElementsCollection.cs
- EndpointNameMessageFilter.cs
- StringDictionary.cs
- CollectionDataContractAttribute.cs
- LayoutTableCell.cs
- Point.cs
- BulletedListEventArgs.cs
- SynchronizationLockException.cs
- DataTable.cs
- TypeSemantics.cs
- FixUpCollection.cs
- SvcMapFileLoader.cs
- AtomServiceDocumentSerializer.cs
- RemotingConfiguration.cs
- AutoResizedEvent.cs
- CleanUpVirtualizedItemEventArgs.cs
- HtmlUtf8RawTextWriter.cs
- GridItemPattern.cs
- FormClosedEvent.cs
- XmlDataSourceNodeDescriptor.cs
- BooleanSwitch.cs
- CodeCatchClause.cs
- RegexCode.cs
- LoadMessageLogger.cs
- IgnoreSection.cs
- PropertyChangeTracker.cs
- TemplateControlCodeDomTreeGenerator.cs
- EventSetterHandlerConverter.cs
- ProjectionCamera.cs
- ObjectHelper.cs
- StorageInfo.cs
- WindowsTab.cs
- XmlElement.cs
- SQLString.cs
- Column.cs
- StringAnimationBase.cs
- ExponentialEase.cs
- ArcSegment.cs
- ConfigurationLocationCollection.cs
- DataGridViewRowCancelEventArgs.cs
- GeneralTransformCollection.cs