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
- SourceFileInfo.cs
- XmlWrappingReader.cs
- TaiwanLunisolarCalendar.cs
- TableProvider.cs
- ExpressionsCollectionConverter.cs
- GridViewCommandEventArgs.cs
- PermissionSetEnumerator.cs
- ToolStripSettings.cs
- Calendar.cs
- XmlSchemaAnyAttribute.cs
- ProcessHost.cs
- Byte.cs
- QueryOperatorEnumerator.cs
- PocoEntityKeyStrategy.cs
- ComponentEvent.cs
- Lasso.cs
- UnsafeNativeMethodsTablet.cs
- MetadataPropertyCollection.cs
- SafeBuffer.cs
- NullableLongMinMaxAggregationOperator.cs
- DodSequenceMerge.cs
- InstanceContextManager.cs
- ServiceControllerDesigner.cs
- GlyphTypeface.cs
- EncryptedHeader.cs
- PasswordBoxAutomationPeer.cs
- CodeTypeConstructor.cs
- TableAutomationPeer.cs
- CultureSpecificStringDictionary.cs
- SocketException.cs
- InfoCardRSAPKCS1KeyExchangeDeformatter.cs
- XmlSecureResolver.cs
- TextParaLineResult.cs
- WebPartDesigner.cs
- XmlUtil.cs
- SqlMethodCallConverter.cs
- SemanticResultKey.cs
- RegexGroupCollection.cs
- ZipIOBlockManager.cs
- RijndaelManagedTransform.cs
- IApplicationTrustManager.cs
- ToolStripDesignerAvailabilityAttribute.cs
- PropertyChangingEventArgs.cs
- DataPager.cs
- CheckBoxAutomationPeer.cs
- SqlRowUpdatingEvent.cs
- XPathNodeList.cs
- StylusPoint.cs
- HeaderedContentControl.cs
- CultureTableRecord.cs
- TriggerAction.cs
- MouseGestureValueSerializer.cs
- IConvertible.cs
- Scene3D.cs
- HashMembershipCondition.cs
- precedingsibling.cs
- ObjectCloneHelper.cs
- AssociationSet.cs
- TCPListener.cs
- CachingHintValidation.cs
- Policy.cs
- OdbcEnvironmentHandle.cs
- SqlCommand.cs
- ModuleConfigurationInfo.cs
- Screen.cs
- ConfigurationLockCollection.cs
- LoginName.cs
- VisualTreeHelper.cs
- TextInfo.cs
- SafeProcessHandle.cs
- RegexCompiler.cs
- CultureTable.cs
- EqualityComparer.cs
- EditorPartCollection.cs
- PageAction.cs
- Transaction.cs
- DefaultPropertyAttribute.cs
- PlatformCulture.cs
- UndirectedGraph.cs
- MessageSmuggler.cs
- TimeEnumHelper.cs
- Base64WriteStateInfo.cs
- ThreadAttributes.cs
- LayoutUtils.cs
- ComAdminInterfaces.cs
- DataControlButton.cs
- BooleanToVisibilityConverter.cs
- ZipFileInfoCollection.cs
- MessageTransmitTraceRecord.cs
- MessageDesigner.cs
- COM2TypeInfoProcessor.cs
- LoginCancelEventArgs.cs
- ListBoxItemWrapperAutomationPeer.cs
- Lock.cs
- XamlBrushSerializer.cs
- EllipticalNodeOperations.cs
- CommandBindingCollection.cs
- ExtendLockCommand.cs
- SocketPermission.cs
- XhtmlBasicCommandAdapter.cs