我为Button单击事件提供了以下代码,在该代码中,我为报表打开了一个新的标签,并且需要从后面的代码中将参数传递给该参数,
String classname = txt_classname.SelectedValue;
String teachername = "Some name";
string url = "Report_Classwise.aspx";
string s = "window.open('" + url + "', 'popup_window', 'width=300,height=100,left=100,top=100,resizable=yes');";
ClientScript.RegisterStartupScript(this.GetType(), "script", s, true);
我需要将类名和教师名传递给Report_Classwise.aspx页面,我尝试设置
string url = "Report_Classwise.aspx?classname='"+classname+"'&teachername='"+teachername+"'";
但这没用
您不需要在URL中添加其他单引号
string url = "Report_Classwise.aspx?classname=" + classname + "&teachername="
+ teachername;
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句