ASP.NET2.0中的ClientScriptManager 类用法—如何添加客户端事件(2) 21 if (!cs.IsClientScriptBlockRegistered(cstype, csname2))22 {23 StringBuilder cstext2 = new StringBuilder();24 cstext2.Append("<script type=text/Javascript> function DoClick() {");25 cstext2.Append("Form1.Message.value='Text from client script.'} </");26 cstext2.Append("script>");27 cs.RegisterClientScriptBlock(cstype, csname2, cstext2.ToString(), false);28 }29 }30 </script>