首先,你要清楚,js是在客户端运行。服务器端的代码先执行
2,客户端的数据要在服务器端使用,要进行一次提交。
参考
http://dotnet.aspx.cc/ShowDetail.aspx?id=49ML4AO8-5PB3-4KNY-NJZD-LJOIOXV4M1X4
2,客户端的数据要在服务器端使用,要进行一次提交。
参考
http://dotnet.aspx.cc/ShowDetail.aspx?id=49ML4AO8-5PB3-4KNY-NJZD-LJOIOXV4M1X4
调试欢乐多
string s_tmp="<script language = 'JavaScript'>window.showModalDialog";
s_tmp += "('stock_plan_detail_input.aspx?bill_id="+s_bill_id;
s_tmp +="&materiel_id="+s_materiel_id+"&s_name="+System.Web.HttpUtility.UrlEncode(s_name);
s_tmp +="'top=150,left=200,width=100,height=100,toolbar=no,status=no');return true</script>);";
this.Page.RegisterStartupScript("2004070201",s_tmp);
然后在stock_plan_detail_input.aspx这个界面里 , 点击确定时定义一个Session变量,
在返回按钮中Response.Write("<script>window.close()</script>")就可以
还有就是在stock_plan_detail_input.aspx的page_load 里写上Response.Write("<base target=_self />");
if ()//判断你定义的Session变量是不是空!!!
{
BindGrid();
Session.Remove("你定义的Session变量的名称");
}
这样就可以刷新了 !!
{
BindGrid();
Session.Remove("你定义的Session变量的名称");
}
因为是服务器代码,已经先执行了。
if (hidReturn=="ok")此处如何引用上面js中的aa变量加以判断返回值?
{
BindGrid();
}