RegisterStartupScript的一个问题
Page.ClientScript.RegisterStartupScript(this.GetType(), new Random().ToString(), "javascript脚本", true);
或者
Page.ClientScript.RegisterStartupScript(this.GetType(), new Random().ToString(), "test()", true);
test在外部的js文件中
如果这段脚本是打开一段地址,是像第一种由asp.net生成在页面里面,还是第二种放在外部的js文件中安全?我认为第二种改地址比较方便,但是貌似不太安全,不知道谁可以帮忙分析下?