switch-case 语句中页面传值出现问题
string UserName = txt_name.Text.ToString();
int UserID = Convert.ToInt32(table.Rows[0][0].ToString());
int m;
m = Convert.ToInt32(DropDownList1.SelectedValue);
switch(m)
{
case 1:
Response.Redirect("~/commcust/SearchCar.aspx?UserID="+UserID+"&UserName="+UserName);
break;
}
运行时出现下列问题:
由于代码已经过优化或者本机框架位于调用堆栈之上,无法计算表达式的值
无法进行页面传值.
为什么会这样?
期待答案
谢谢!