在aspx中的html里写了如下一个javascript
function NewPlanUserExecute(taskID,allotUserID,allotUserName)
{
var retVal = window.showModalDialog("Allot.aspx?action=new&taskID="+taskID+"&allotUserID ="+allotUserID +"&allotUserName="+allotUserName, null, "dialogHeight:700px;dialogWidth:600px;scroll:no;status:no;help:no");………………
}对应的cs文件中的传递参数语句为
ibPlan.Attributes.Add("onclick", "javascript:NewPlanUserExecute(\'"+form.data.taskID + "\',\'" + helper.user.UserId + "\',\'" + helper.user.UserName + "\')");
可是传递到Allot.aspx时候,发现只传了一个taskID,而且该taskID的值等于taskID值+allotUserID值+allotUserName值,
应该是传递语句写错了,请路过的高手指点一下
function NewPlanUserExecute(taskID,allotUserID,allotUserName)
{
var retVal = window.showModalDialog("Allot.aspx?action=new&taskID="+taskID+"&allotUserID ="+allotUserID +"&allotUserName="+allotUserName, null, "dialogHeight:700px;dialogWidth:600px;scroll:no;status:no;help:no");………………
}对应的cs文件中的传递参数语句为
ibPlan.Attributes.Add("onclick", "javascript:NewPlanUserExecute(\'"+form.data.taskID + "\',\'" + helper.user.UserId + "\',\'" + helper.user.UserName + "\')");
可是传递到Allot.aspx时候,发现只传了一个taskID,而且该taskID的值等于taskID值+allotUserID值+allotUserName值,
应该是传递语句写错了,请路过的高手指点一下
解决方案 »
- 问个小小小问题
- showModal问题
- 如何在DataGrid中添加一行新记录
- 再请教cookie.同一个cookie值,一个说未将对象引用设置到对象的实例,一个却正确。
- 无法识别的配置节“connectionStrings” 求救!
- 那里可以下载2005 beta版??
- 点后能出现类名,但编译却说(是否缺少程序集引用?),这怎么解决啊
- Win7 64位安装VS2013无法连接远程数据库
- 如何判断数据库中一个表是否已经存在?不存在就创建一个!存在就补充数据
- 关于控件克隆的问题(送分喇,快来)
- DataList弹出窗体并传值怎样实现????????????
- 如何更新Excel文件中的某个特定单元格啊?
function NewPlanUserExecute(taskID,allotUserID,allotUserName)
{
var retVal = window.showModalDialog("button.aspx?action=new&taskID="+taskID+"&allotUserID="+allotUserID +"&allotUserName="+allotUserName, null, "dialogHeight:700px;dialogWidth:600px;scroll:no;status:no;help:no");
} string taskID = "a";
string allotUserID = "b";
string allotUserName = "c";
string js = "javascript:NewPlanUserExecute('" + taskID + "','" + allotUserID + "','" + allotUserName + "')";
btn.Attributes.Add("onclick", js);
Request.QueryString["taskID"]和
Request.QueryString["allotUserName"])两个值传过去了,
但是Request.QueryString["allotUserID"]传不过去。很仔细的对了一下语法,已经和你写的一样了。
会是什么原因呢?