向javascript中传c#中的变量值问题 Response.Write("location.href='adm_othergl.aspx?channel="+id.ToString()+"';"); 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 不行呀。完整代码如下 string id = Request.QueryString["channel"].ToString(); Response.Write("<script language='javascript'>"); Response.Write("location.href='adm_othergl.aspx?channel="+id+"';"); Response.Write("</script>");老说缺少‘;’ 调试后:就是这样了<script language='javascript'>alert('已删除记录!');location.href=channel='16'';</script> 'adm_othergl.aspx?channel = '16'' 这句有问题。就是代码中'adm_othergl.aspx?channel="+id+"' 这句有问题造成的。 Response.Write("location.href=\"adm_othergl.aspx?channel="+id.ToString()+"\";"); 谢谢, qiang119(强) ok了。 数据库比较小工具求助 NET程序目标在服务器上,运行怪事一桩 错误:远程服务器返回错误: (405) 不允许的方法。 C#实现动态矩阵乘法 C#,asp.net可以做水晶报表吗?是不是只能用VB.NET做? 如何屏蔽Media Player 的双击全屏事件? 用C#搞开发,手边应必备哪些参考资料和书 100分求代码???? 请教snmpsharpnet库的使用? ▲▲My God——我又发现DataSet的一个BUG,快来灭虫!▲▲ 四舍五入的问题! 如何提高TcpClient的接收频率
string id = Request.QueryString["channel"].ToString();
Response.Write("<script language='javascript'>");
Response.Write("location.href='adm_othergl.aspx?channel="+id+"';");
Response.Write("</script>");老说缺少‘;’
<script language='javascript'>alert('已删除记录!');location.href=channel='16'';</script> 'adm_othergl.aspx?channel = '16'' 这句有问题。就是代码中'adm_othergl.aspx?channel="+id+"' 这句有问题造成的。