更新时间:2023-02-15 13:17:07
此异常显示是因为控件无法检测到。
表示:无法呈现控件。
检查名称rbYes是否正确。
休息看起来没问题。
This Exception is showing because the control is unable to detect.
Means:unable to render the control.
Check the name "rbYes" is correct or not.
rest looks ok.
FindControl
可能找不到您在该行指定的名称:
TheFindControl
is probably not finding the name you specified at the line :
RadioButton rbYes = editItem.FindControl("rbYes");
检查名称rbYes是否正确。
Check the name "rbYes" is correct.
基本上,您的代码无法找到名为rbYes的控件。
Basically, your code failed to find a control called "rbYes".
RadioButton rbYes = (RadioButton)editItem.FindControl("rbYes");
检查一下r editItem
实际上包含了这个,或者你拼写正确。
Check that your editItem
actually contains this, or that you have spelled it correctly.