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. Help needed in finding control

Help needed in finding control

Scheduled Pinned Locked Moved ASP.NET
helpquestiontestingbeta-testing
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.
  • T Offline
    T Offline
    The Pod
    wrote on last edited by
    #1

    Hi guys, i have encountered a problem in finding control. i have binded data to a label in a datalist to retreive a email and it works. but next, i have a new label by the name of "Testing". How do i grab the bound data from the label to put into a string? i have tried findcontrol. from finding first the datalist then the label control, and directly findcontrol for the label and it still doesnt work. guidance needed!! Below will be the code i have on hand: Part of the source code will be like How do i grab the eval email value and put to a string? Kindly please help, thanks guys :)

    C 1 Reply Last reply
    0
    • T The Pod

      Hi guys, i have encountered a problem in finding control. i have binded data to a label in a datalist to retreive a email and it works. but next, i have a new label by the name of "Testing". How do i grab the bound data from the label to put into a string? i have tried findcontrol. from finding first the datalist then the label control, and directly findcontrol for the label and it still doesnt work. guidance needed!! Below will be the code i have on hand: Part of the source code will be like How do i grab the eval email value and put to a string? Kindly please help, thanks guys :)

      C Offline
      C Offline
      Cybernate
      wrote on last edited by
      #2

      Hi, Assume ID for your datalist control is dlist. Then string szChandu = (dlist.Items[i].FindControl("Label1") as Label).Text; should work. Please note i in the above code is the ith row of the datalist.

      Regards, Cybernate

      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