
想实现这样一个简单的功能,却折腾了半天。原因是第一次使用asp.net ajax,本来是不想使用的MS的。却想看看他的框架如何。
使用Response.write (js) 会出错。找了一些文档来看,原来要使用ScriptManager的静态方法 RegisterStartupScript 来实现调用。不知为什么实例类型没有提供这种方法。害得我花了很多的时间。
ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "updateScript"...