标题if ( RadioButtonList1.SelectedItem.Value == myRead[“usetype”].ToString()
{ Response.Redirect("student.aspx"); }
没有报错但是实现不了跳转,测试过两个值都是相等的
RadioButtonList1.SelectedItem.Value获取到的值是student
myRead["usetype"].ToString()这个获取到的值也是student
可是就是实现不了Response.Redirect("student.aspx");这段话的功能
但是当if ( RadioButtonList1.SelectedItem.Value==“student”)
{
Response.Redirect("student.aspx");
}
它能自动跳转到student.aspx
怎么解决呀
本文探讨了一位开发者在使用C#进行条件判断并尝试页面跳转时遇到的问题。尽管RadioButtonList1.SelectedItem.Value与myRead[usetype].ToString()两值相等,但Response.Redirect(student.aspx)无法正常工作。然而,当直接将字符串student用于比较时,跳转功能正常。文章详细描述了这一现象,并寻求解决方案。
161

被折叠的 条评论
为什么被折叠?



