2013年8月16日

C# .net 下载了个.dll的文件,怎么用啊?

摘要: 在你的项目中,右键单击项目然后添加引用,选择浏览选项卡,找到你下载的DLL文件双击即可。一般会在你的项目目录的bin子目录下。然后就可以用这个DLL文件了。用法跟类一样,先实例化,然后直接调用里边的方法即可。 阅读全文

posted @ 2013-08-16 17:35 YoungPop_Chen 阅读(239) 评论(0) 推荐(0) 编辑

ScriptManager.RegisterStartupScript用法详解

摘要: 如果页面中不用Ajax,cs中运行某段js代码方式可以是:Page.ClientScript.RegisterStartupScript(Page.GetType(), "", "");如果页面中使用了Ajax ,则上述代码即使执行也无效果。对这种情况我们通常采用:ScriptManager.RegisterStartupScript(this.Button1, this.GetType(), "alertScript", "window.open('default2.aspx');", true) 阅读全文

posted @ 2013-08-16 17:10 YoungPop_Chen 阅读(1815) 评论(0) 推荐(0) 编辑

ScriptManager.RegisterStartupScript与ClientScript.RegisterStartupScript区别

摘要: ScriptManager.RegisterStartupScript与ClientScript.RegisterStartupScript区别ScriptManager和ClientScript的区别,他俩的方法是一样的,只是在特殊的场合要注意使用。ScriptManager适用在特殊的场合,那么我们在控件中如何来进行区分应该使用哪一个呢?其实可以通过寻找控件的parent,判断是否有updatepanel,如果有就用ScriptManager;没有的话当然用ClientScript,避免每次postback操作时控件都要进行资源文件的注册。也就是说 是否兼容ajax的问题,ScriptMa 阅读全文

posted @ 2013-08-16 16:43 YoungPop_Chen 阅读(341) 评论(0) 推荐(0) 编辑

导航