c# control names

前端 未结 4 1089
小鲜肉
小鲜肉 2021-01-25 17:01

Is there a way to control how .Net sets the Name and ID property of my controls? I have some radio buttons for which I need the name to be the same.

4条回答
  •  情话喂你
    2021-01-25 17:22

    I have solved this problem in the past by creating a new control that inherits from RadioButton but adds a new GroupName property that is used to render the name of the control. Unfortunately I don't have the code handy, but a quick google came up with something similar on codeproject.

提交回复
热议问题