How to check Checkbox checked using C# and VB.Net in ASP.Net

Last Reply on Dec 23, 2016 05:35 AM By AnandM

Posted on Nov 07, 2016 01:49 AM

 

 <asp:CheckBox ID="cbhis" runat="server" Text="Hi Speed Internet"></asp:CheckBox>


 Dim his As String = ""
        If cbhis.Checked = True Then
            his = "True"
        Else
            his = "False"
        End If

 

You are viewing reply posted by: AnandM on Dec 23, 2016 05:35 AM.
Posted on Dec 23, 2016 05:35 AM

Hi yogeshc,

It will return false if you havent checked the checkbox if you have checked it then it will return true so put a debug and check your code where you are missing something. Because i have already provided you a sample and cant remotely check your code.