how to make radiobuttion visible false in repeater?

Diksha dudi 126 Reputation points

I am having 5 radio button in repeater and want to make it invisible when its text is nothing, but it is not working

aspx code:

193470-screenshot-63.png193591-screenshot-64.png193527-screenshot-65.png code:

Imports System.Data  
Imports System.Data.SqlClient  
Partial Class Product_detailpage  
    Inherits System.Web.UI.Page  
    Dim user_id As Integer  
    Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load  
        If Not Me.IsPostBack Then  
        End If  
    End Sub  
    Private Sub prod_size()  
        Dim value As String = ""  
        For Each item As RepeaterItem In durl.Items  
            If item.ItemType = ListItemType.AlternatingItem OrElse item.ItemType = ListItemType.Item Then  
                Dim rdb As RadioButton = TryCast(item.FindControl("RadioButton1"), RadioButton)  
                Dim rdb1 As RadioButton = TryCast(item.FindControl("RadioButton2"), RadioButton)  
                Dim rdb2 As RadioButton = TryCast(item.FindControl("RadioButton3"), RadioButton)  
                Dim rdb3 As RadioButton = TryCast(item.FindControl("RadioButton4"), RadioButton)  
                Dim rdb4 As RadioButton = TryCast(item.FindControl("RadioButton5"), RadioButton)  
                If rdb.Text Is Nothing Then  
                    rdb.Visible = False  
                End If  
                If rdb1.Text Is Nothing Then  
                    rdb1.Visible = False  
                End If  
                If rdb2.Text Is Nothing Then  
                    rdb2.Visible = False  
                End If  
                If rdb3.Text Is Nothing Then  
                    rdb3.Visible = False  
                End If  
                If rdb4.Text Is Nothing Then  
                    rdb4.Visible = False  
                End If  
            End If  
    End Sub  



A set of technologies in the .NET Framework for building web applications and XML web services.
1,481 questions
ASP.NET Web Forms
ASP.NET Web Forms
A part of the ASP.NET web application framework that can be used to create ASP.NET web applications.
550 questions
{count} votes