Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Regarding counting of Html controls

Regarding counting of Html controls

Scheduled Pinned Locked Moved ASP.NET
csharphtmlasp-netdesign
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nagalakshmibasireddy
    wrote on last edited by
    #1

    hello, I need count the number of empty html input boxes . I am using asp.net(coding in vb.net) I am using the following code to get access to all the input boxes since there are many of them in my form.Can u tell me what should I write in the if condition so that I can check if the input box is empty? Dim count As Integer Dim form As HtmlForm form = Me.FindControl("Form1") Dim control As Control For Each control In form.Controls If (Convert.ToString(control.GetType) = "System.Web.UI.HtmlControls.HtmlInputText") Then if( ) count = count + 1 end if End If Next Thanks & Regards Nagalakshmi

    M 1 Reply Last reply
    0
    • N nagalakshmibasireddy

      hello, I need count the number of empty html input boxes . I am using asp.net(coding in vb.net) I am using the following code to get access to all the input boxes since there are many of them in my form.Can u tell me what should I write in the if condition so that I can check if the input box is empty? Dim count As Integer Dim form As HtmlForm form = Me.FindControl("Form1") Dim control As Control For Each control In form.Controls If (Convert.ToString(control.GetType) = "System.Web.UI.HtmlControls.HtmlInputText") Then if( ) count = count + 1 end if End If Next Thanks & Regards Nagalakshmi

      M Offline
      M Offline
      minhpc_bk
      wrote on last edited by
      #2

      Hi there. You can do a checking on the HtmlInputText.Value Property [^] to see if it is empty.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups