/// <summary> /// Adds a CSS reference to a view if it has not been added already. /// </summary> /// <param name="name">An name to use to represent this resource. Typically this should be the file name and extension of the resource (minus any path information). /// You can use the other overloaded method to skip adding a name, and the resource path and file name (if any) will be used instead. /// If the name or resource path contains the typical ".min." name part, it will be ignored to make comparisons more consistent. /// </param> /// <param name="cssPath">A URI to the script to add to the page.</param> /// <param name="renderTarget">Where to render the script.</param> public ResourceInfo CSS(string name, string cssPath, RenderTargets renderTarget = RenderTargets.Header) { return(XT.RequireResource(name, cssPath, ResourceTypes.CSS, renderTarget)); }
// -------------------------------------------------------------------------------------------------------------------- /// <summary> /// Adds a script (usually JavaScript) to a view if it has not been added already. /// </summary> /// <param name="name">An name to use to represent this resource. Typically this should be the file name and extension of the resource (minus any path information). /// You can use the other overloaded method to skip adding a name, and the resource path and file name (if any) will be used instead. /// If the name or resource path contains the typical ".min." name part, it will be ignored to make comparisons more consistent. /// </param> /// <param name="scriptPath">A URI to the script to add to the page.</param> /// <param name="renderTarget">Where to render the script.</param> public ResourceInfo Script(string name, string scriptPath, RenderTargets renderTarget = RenderTargets.Header) { return(XT.RequireResource(name, scriptPath, ResourceTypes.Script, renderTarget)); }