New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial

Associates a client script resource with an extender class. This allows the extender to find it's associated script and what names and prefixes with which to reference it.

Definition

Namespace:Telerik.Web

Assembly:Telerik.Web.UI.dll

Syntax:

C#
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
[SuppressMessage("Microsoft.Design", "CA1019:DefineAccessorsForAttributeArguments", Justification = "The composition of baseType, resourceName, and fullResourceName is available as ResourcePath")]
public sealed class ClientScriptResourceAttribute : Attribute, _Attribute

Inheritance: objectAttributeClientScriptResourceAttribute

Implements: _Attribute

Inherited Members Attribute.GetCustomAttributes(MemberInfo, Type)Attribute.GetCustomAttributes(MemberInfo, Type, bool)Attribute.GetCustomAttributes(MemberInfo)Attribute.GetCustomAttributes(MemberInfo, bool)Attribute.IsDefined(MemberInfo, Type)Attribute.IsDefined(MemberInfo, Type, bool)Attribute.GetCustomAttribute(MemberInfo, Type)Attribute.GetCustomAttribute(MemberInfo, Type, bool)Attribute.GetCustomAttributes(ParameterInfo)Attribute.GetCustomAttributes(ParameterInfo, Type)Attribute.GetCustomAttributes(ParameterInfo, Type, bool)Attribute.GetCustomAttributes(ParameterInfo, bool)Attribute.IsDefined(ParameterInfo, Type)Attribute.IsDefined(ParameterInfo, Type, bool)Attribute.GetCustomAttribute(ParameterInfo, Type)Attribute.GetCustomAttribute(ParameterInfo, Type, bool)Attribute.GetCustomAttributes(Module, Type)Attribute.GetCustomAttributes(Module)Attribute.GetCustomAttributes(Module, bool)Attribute.GetCustomAttributes(Module, Type, bool)Attribute.IsDefined(Module, Type)Attribute.IsDefined(Module, Type, bool)Attribute.GetCustomAttribute(Module, Type)Attribute.GetCustomAttribute(Module, Type, bool)Attribute.GetCustomAttributes(Assembly, Type)Attribute.GetCustomAttributes(Assembly, Type, bool)Attribute.GetCustomAttributes(Assembly)Attribute.GetCustomAttributes(Assembly, bool)Attribute.IsDefined(Assembly, Type)Attribute.IsDefined(Assembly, Type, bool)Attribute.GetCustomAttribute(Assembly, Type)Attribute.GetCustomAttribute(Assembly, Type, bool)Attribute.Equals(object)Attribute.GetHashCode()Attribute.Match(object)Attribute.TypeIdobject.ToString()object.Equals(object, object)object.ReferenceEquals(object, object)object.GetType()...

Constructors

C#
public ClientScriptResourceAttribute()

Associates a client script resource with the class.

C#
public ClientScriptResourceAttribute(string componentType, string fullResourceName)
Parameters:componentTypestring

The name given to the class in the Web.TypeDescriptor.addType call

fullResourceNamestring

The name of the script resource, e.g. 'ControlLibrary1.FooExtender.Foo.js'

Associates a client script resource with the class.

C#
public ClientScriptResourceAttribute(string componentType, Type baseType, string resourceName)
Parameters:componentTypestring

The name given to the class in the Web.TypeDescriptor.addType call

baseTypeType

A Type that lives in the same folder as the script file

resourceNamestring

The name of the script file itself (e.g. 'foo.cs')

Called from other constructors to set the prefix and the name.

C#
public ClientScriptResourceAttribute(string componentType)
Parameters:componentTypestring

The name given to the class in the Web.TypeDescriptor.addType call

Properties

The component type name to use when referencing the component class in XML. If the XML reference is "<myns:Foo/>", the component type is "Foo".

C#
public string ComponentType { get; set; }
C#
public int LoadOrder { get; set; }

This is the path to the resource in the assembly. This is usually defined as [default namespace].[Folder name].FileName. In a project called "ControlLibrary1", a JScript file called Foo.js in the "Script" subdirectory would be named "ControlLibrary1.Script.Foo.js" by default.

C#
public string ResourcePath { get; set; }

Methods

C#
public override bool IsDefaultAttribute()
Returns:

bool

Overrides: Attribute.IsDefaultAttribute()