mirror of
https://github.com/mm201/pkmn-classic-framework.git
synced 2026-05-24 11:56:09 -05:00
40 lines
936 B
C#
40 lines
936 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
|
|
namespace PkmnFoundations.Web
|
|
{
|
|
public class RequireScript : RequireLinkBase
|
|
{
|
|
public RequireScript() : base()
|
|
{
|
|
|
|
}
|
|
|
|
public override void RenderHeader(System.Web.UI.HtmlTextWriter writer)
|
|
{
|
|
writer.AddAttribute("src", ResolveUrl(ScriptUrl ?? ""));
|
|
writer.AddAttribute("type", Type ?? "text/javascript");
|
|
writer.RenderBeginTag("script");
|
|
writer.RenderEndTag();
|
|
}
|
|
|
|
public String ScriptUrl { get; set; }
|
|
public String Type { get; set; }
|
|
|
|
public override string Key
|
|
{
|
|
get
|
|
{
|
|
if (base.Key != null)
|
|
return base.Key;
|
|
return ScriptUrl;
|
|
}
|
|
set
|
|
{
|
|
base.Key = value;
|
|
}
|
|
}
|
|
}
|
|
} |