1

我需要帮助从 onLoadpage 后面的 vb 代码中查找 HTLM 输入单选按钮,如果单选按钮值为空,我需要隐藏单选按钮。我试过`

        For Each gvr As DataListItem In DataList1.Items
            Dim hf As HtmlInputRadioButton = gvr.FindControl("RadioButton1")

            If hf.Value = " " Then
                hf.Visible = False
            Else


            End If
        Next` 

我收到一条错误消息:无法将“System.Web.UI.WebControl.RadioButton”类型的对象转换为字符串“System.Web.UI.HTMLControl.HTMLINPUTRadioButton”提前谢谢

4

0 回答 0