“grbFiltro”这个名称在当前上下文中不存在 [英] The name 'grbFiltro' does not exist in the current context
问题描述
我想根据单选按钮选择列表为字符串a分配值....因为我使用了这段代码但显示错误...
i want to assign value to string a according to radio button selection list....for that i used this code but it showing the error...
"The name 'grbFiltro' does not exist in the current context"
这是我的代码...
This is my code...
IEnumerable<radiobutton> buttons = grbFiltro.Controls.OfType<radiobutton>() ;
foreach (var Button in buttons)
{
if (Button.Checked)
{
//Do Somethingrb
}
}
什么是grbFiltro?我在谷歌搜索但没有满意的答案....对我来说
what is grbFiltro? i searched in google but no satisfied answer....for me
推荐答案
谢谢你快速回复....我的上下文是我需要根据单选按钮选择为字符串赋值....我不能启用单选按钮选项模式...但我得到解决方案我assaign组放射线按钮的名称和我的问题已解决
thank u for quick response....my context is i need to assign value to string according to radio button selecttion....i cant enable single selection mode for radio button...but i got solution i assaign group name for radiio button and my problem solved
添加答案以从未答复的列表中移动它。
Adding answer to move it from Unanswered list.
这篇关于“grbFiltro”这个名称在当前上下文中不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!