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. repeater

repeater

Scheduled Pinned Locked Moved ASP.NET
designhelp
4 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.
  • D Offline
    D Offline
    david boon
    wrote on last edited by
    #1

    hi, i have a repeater control with checl boxes and labels. i am able check if check box is checked or not but iam unable to get the value in label. my code is Dim lb1 As String lb1 = (CType(Repeater1.Items(0).Controls(2), System.Web.UI.WebControls.Label)).Text plz help me

    M 1 Reply Last reply
    0
    • D david boon

      hi, i have a repeater control with checl boxes and labels. i am able check if check box is checked or not but iam unable to get the value in label. my code is Dim lb1 As String lb1 = (CType(Repeater1.Items(0).Controls(2), System.Web.UI.WebControls.Label)).Text plz help me

      M Offline
      M Offline
      Mike Ellison
      wrote on last edited by
      #2

      What error are you getting? Are you sure your Label controls are at position index 2 in the Controls collection?

      D 1 Reply Last reply
      0
      • M Mike Ellison

        What error are you getting? Are you sure your Label controls are at position index 2 in the Controls collection?

        D Offline
        D Offline
        david boon
        wrote on last edited by
        #3

        hi, label is at position 4. type cas error is occured. specific type cast not allowed

        M 1 Reply Last reply
        0
        • D david boon

          hi, label is at position 4. type cas error is occured. specific type cast not allowed

          M Offline
          M Offline
          Mike Ellison
          wrote on last edited by
          #4

          The other aspect to this is the context in which you want your code to run. Is this in an event handler? Please describe more if so. The code you indicated before showed index 2, not 4... is that where your invalid type cast is occuring?

          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