码迷,mamicode.com
首页 > Web开发 > 详细

asp.net中Page.ClientScript.RegisterStartupScript用法小结

时间:2015-04-28 13:28:05      阅读:119      评论:0      收藏:0      [点我收藏+]

标签:

ClientScript.RegisterStartupScript(Page.GetType(), "Show", "alert(‘" + l_strConferenceNo + "‘);",true);原型如下

ClientScript.RegisterStartupScript(Type type, string key, string script,bool addScriptTags);区别是bool addScriptTags为true 我们需要写JavaScript实现代码就可以了,不用加<script></script>。

ClientScript.RegisterStartupScript(Page.GetType(), "Show", "<script>alert(‘" + l_strConferenceNo + "‘);</script>");原型如下

ClientScript.RegisterStartupScript(Type type, string key, string script);必须要加<script></script>。

 

asp.net中Page.ClientScript.RegisterStartupScript用法小结

标签:

原文地址:http://www.cnblogs.com/WarBlog/p/4462414.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!