我的gridview 绑定了一个表的数据,gridview外有一个修改按钮,点击修改可以修改数据代码如下
url = "~/PlugIn/IOSMgt/IOS/Task/TaskUpdate.aspx?task_name=" + GridView1.Rows[i].Cells[3].Text.ToString() + "&cat=" + GridView1.Rows[i].Cells[7].Text.ToString() + "&state=" + GridView1.Rows[i].Cells[8].Text.ToString() + "&expect_period=" + expect_period + "&mobilephone=" + mobilephone + "&description=" + description;
我要把cat 传到另一个页面的一个dropdownlist 中,但是传递过去总是空值。我把代码贴出来大家帮帮忙 this.dropTtype.SelectedValue = Request.QueryString["cat"];这是dropdownlist绑定
SortedList cattype = ConfigurationSet.Default.GetDicData("Cat");
this.dropTtype.DataSource = cattype;
this.dropTtype.DataTextField = "value";
this.dropTtype.DataValueField = "key";
this.dropTtype.DataBind();
this.dropTtype.Items.Insert(0, new ListItem(" -请选择- ", "-1"));
url = "~/PlugIn/IOSMgt/IOS/Task/TaskUpdate.aspx?task_name=" + GridView1.Rows[i].Cells[3].Text.ToString() + "&cat=" + GridView1.Rows[i].Cells[7].Text.ToString() + "&state=" + GridView1.Rows[i].Cells[8].Text.ToString() + "&expect_period=" + expect_period + "&mobilephone=" + mobilephone + "&description=" + description;
我要把cat 传到另一个页面的一个dropdownlist 中,但是传递过去总是空值。我把代码贴出来大家帮帮忙 this.dropTtype.SelectedValue = Request.QueryString["cat"];这是dropdownlist绑定
SortedList cattype = ConfigurationSet.Default.GetDicData("Cat");
this.dropTtype.DataSource = cattype;
this.dropTtype.DataTextField = "value";
this.dropTtype.DataValueField = "key";
this.dropTtype.DataBind();
this.dropTtype.Items.Insert(0, new ListItem(" -请选择- ", "-1"));
传递中文要进行escape编码 后台获取解码
但是换成dropdownlist 就获得空值
Response.Write("<scr" + "ipt language='javascript'>Request.QueryString["cat"]; </" + "script>");
return;
看看 是不是传值就没有传过来
Parameter name: value
'dropTtype'拥有的SelectedValue是无效的,因为它不存在于项目的清单。
参数名称:值
8楼的我就这么做的但是就报这样的错