Accessing value of dynamically created controls c# asp.net

后端 未结 2 1499
花落未央
花落未央 2021-02-04 19:32

I\'m trying to access the value of a selected radioButton. I have a list of radio button\'s seperated by sub headers (hence why i havent used a radioList)

I don\'t know

2条回答
  •  无人及你
    2021-02-04 19:43

    The FindControl method you are using, expects you to pass it the ID that was assigned to control when you created it.

    So for your example the RadioButton.ID should be equal to singleType.appTypeID.ToString()

    Hope this helps.

提交回复
热议问题