如何处理在Ajax中用Response.write()
来源:互联网 发布:合影软件 编辑:程序博客网 时间:2024/05/20 05:25
ScriptManager.RegisterStartupScript(this.Button1, this.GetType(), "alertScript", "window.open('default2.aspx');", true);
其中第一个参数为要注册脚本的控件ID,试了一下,只要是本页面的就行。
第二个参数为注册脚本控件类型,是控件还是this的GetType()都可以,typeOf(string)也没问题.
第三个脚本函数的名字,随便起。
第四个是脚本内容。
第五个是标明是否再添加脚本标签,如果第四个参数里包含了 <script> </script>标签,此处则为false,否则为true。
//确定
protected void btnOK_Click(object sender, EventArgs e)
{
string name = "";
string id = "";
TreeNodeCollection node = this.TreeView1.CheckedNodes;
foreach(TreeNode item in node)
{
if(item.Checked==true)
{
if (item.Value.Substring(0,1)=="X")
{
if (name == "" && id == "")
{
name = item.Text;
id = item.Value;
}
else
{
name = name + "," + item.Text;
id = id + "," + item.Value;
}
}
}
}
string str = "window.returnValue='"+name+"@"+id+"';window.close()";
ScriptManager.RegisterStartupScript(this.btnOK, this.GetType(), "pringStr", ""+str+"", true);
}
- 如何处理在Ajax中用Response.write()
- ajax.net中Response.Write()的处理方法
- response.getWriter().write()用于ajax
- ASP.NET AJAX使用UpdatePanel控件+Response.Write()报错 处理方法
- ajax updatepannel中response.write()问题
- ajax updatepannel中response.write()问题
- 含Ajax项目的 Response.Write 使用
- AJAX 与 Response.Write() (.net 2.0)
- 在atlas(ajax)中请不要使用Response.Write,请使用ClientScript.RegisterClientScriptBlock替换
- 在atlas(ajax)中请不要使用Response.Write,请使用ClientScript.RegisterClientScriptBlock替换
- 关于ASP.NET中用Response.Write(),linkbutton弹出新页面
- Response.Write处理js页面字体变大
- Response.Write
- Response.Write("");
- response.write
- response.write
- Response.Write("");
- AJAX下不能使用RESPONSE.WRITE 脚本的解决方案
- 将NSString转换成UTF8编码的NSString
- PLSQL Developer设置及快捷键设置
- 一篇简化的Linux启动过程说明
- Ant数据类型和属性
- C++常用小功能参考
- 如何处理在Ajax中用Response.write()
- 百鸡百钱
- linux下scp命令详解
- 配置文件局部变量和全局变量
- 分书问题
- JSP————隐式对象
- 在linux shell中使用ftp命令来实现自动上传与下载
- JSP元素
- flex获取文件夹下的所有文件名