从后面的vb代码中找到HTML输入单选按钮,如果值为空,则隐藏单选按钮

时间:2013-02-21 08:36:16

标签: code-behind html-input htmlcontrols

我需要帮助从onLoadpage后面的vb代码中找到HTLM输入radiobutton,如果radiobutton值为空,我需要隐藏radiobutton。我试过了          `

        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' 提前致谢

0 个答案:

没有答案