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
- SqlDataSource.cs
- SelectedGridItemChangedEvent.cs
- HtmlInputControl.cs
- metadatamappinghashervisitor.cs
- SqlFunctionAttribute.cs
- XamlReaderHelper.cs
- XmlIlTypeHelper.cs
- RegexCaptureCollection.cs
- ToolStripDesignerAvailabilityAttribute.cs
- BamlResourceContent.cs
- ItemAutomationPeer.cs
- DesignerSerializationOptionsAttribute.cs
- TextBox.cs
- BulletChrome.cs
- MultiPageTextView.cs
- DocumentGridPage.cs
- DataGridViewTextBoxEditingControl.cs
- FormsAuthenticationUser.cs
- IndexingContentUnit.cs
- ReversePositionQuery.cs
- ServerIdentity.cs
- ProvidePropertyAttribute.cs
- RsaEndpointIdentity.cs
- ColorMap.cs
- TextTreePropertyUndoUnit.cs
- DbProviderFactoriesConfigurationHandler.cs
- Region.cs
- GroupItem.cs
- DataGridCaption.cs
- Journal.cs
- WaitHandle.cs
- CalendarDayButton.cs
- AppSettingsReader.cs
- MediaSystem.cs
- KoreanCalendar.cs
- ToolStripOverflow.cs
- SQLInt64.cs
- Baml2006SchemaContext.cs
- HuffmanTree.cs
- Crypto.cs
- StorageSetMapping.cs
- sqlcontext.cs
- CollectionConverter.cs
- JsonMessageEncoderFactory.cs
- GcSettings.cs
- Tuple.cs
- GeneralTransform3DCollection.cs
- WeakEventTable.cs
- WebPartsSection.cs
- MouseButtonEventArgs.cs
- BindingMAnagerBase.cs
- EvidenceTypeDescriptor.cs
- DynamicScriptObject.cs
- XmlSchemaSimpleTypeRestriction.cs
- sqlstateclientmanager.cs
- SeekableReadStream.cs
- OleDbStruct.cs
- ConfigViewGenerator.cs
- ExeConfigurationFileMap.cs
- CryptoStream.cs
- LineServices.cs
- TabControl.cs
- TableCell.cs
- ListCommandEventArgs.cs
- HtmlWindowCollection.cs
- CookieProtection.cs
- Encoder.cs
- DataServiceContext.cs
- DoubleStorage.cs
- WmlCalendarAdapter.cs
- CollectionDataContractAttribute.cs
- ContractsBCL.cs
- ReceiveErrorHandling.cs
- HeaderedContentControl.cs
- XmlSchemaValidationException.cs
- FlowDocumentView.cs
- XmlDataSourceNodeDescriptor.cs
- PeerHopCountAttribute.cs
- TypeHelpers.cs
- ImpersonationContext.cs
- KeyTimeConverter.cs
- TextElementEnumerator.cs
- TextRangeProviderWrapper.cs
- SoapIncludeAttribute.cs
- SafeUserTokenHandle.cs
- QueryPageSettingsEventArgs.cs
- RenderDataDrawingContext.cs
- DocComment.cs
- UshortList2.cs
- Journaling.cs
- BlurEffect.cs
- LastQueryOperator.cs
- TypeDependencyAttribute.cs
- DecimalFormatter.cs
- ByteRangeDownloader.cs
- ThreadPool.cs
- StateBag.cs
- SqlPersonalizationProvider.cs
- TrustDriver.cs
- Util.cs