示例#1
0
文件: WebPage.cs 项目: mind0n/hive
		public static void RegistScript(WebPage page, string script, string format = null)
		{
			if (!string.IsNullOrEmpty(format))
			{
				script = string.Format(format, script);
			}
			if (!string.IsNullOrEmpty(script))
			{
				page.clientScripts.Add(script);
			}
		}
示例#2
0
文件: WebPage.cs 项目: mind0n/hive
		public static void AddPageVariable(WebPage page, string name, string content)
		{
			if (content.EndsWith(";"))
			{
				content = content.Left(-1);
			}
			AddPageScript(page, string.Concat("page.", name, " = ", content));
		}