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. ASP 2 .net FindControl method no longer works

ASP 2 .net FindControl method no longer works

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netquestion
4 Posts 3 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.
  • R Offline
    R Offline
    robmays
    wrote on last edited by
    #1

    this method worked fine in asp.net, now when a user select a select command on my datalist the ((TextBox)e.item.findcontrol("txtBlah")).Text does not return the value of my textbox control in the editItem of my datalist. Has the datalist got something in asp2 that i should attempt?:^)

    O M 2 Replies Last reply
    0
    • R robmays

      this method worked fine in asp.net, now when a user select a select command on my datalist the ((TextBox)e.item.findcontrol("txtBlah")).Text does not return the value of my textbox control in the editItem of my datalist. Has the datalist got something in asp2 that i should attempt?:^)

      O Offline
      O Offline
      OMalleyW
      wrote on last edited by
      #2

      Check here dude Clicky[^] Will

      R 1 Reply Last reply
      0
      • R robmays

        this method worked fine in asp.net, now when a user select a select command on my datalist the ((TextBox)e.item.findcontrol("txtBlah")).Text does not return the value of my textbox control in the editItem of my datalist. Has the datalist got something in asp2 that i should attempt?:^)

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

        Hi there, Do you have anything with the issue suggested by OMalleyW? Or could you be more specific about your sample code? Here is just an example of using the FindControl method with a datalist control: http://msdn2.microsoft.com/en-us/library/49fe2efd(en-US,VS.80).aspx[^]

        1 Reply Last reply
        0
        • O OMalleyW

          Check here dude Clicky[^] Will

          R Offline
          R Offline
          robmays
          wrote on last edited by
          #4

          all these methods fail still stuck TextBox txt = ((TextBox)e.Item.FindControl("txtLastname2")).Text; string fart = Parent.FindControl("txtLeadID2").ID; if (((TextBox)e.Item.FindControl("txtLeadID2")).Text.Length > 0) { leadID = Convert.ToInt32(((TextBox)e.Item.FindControl("txtLeadID2")).Text); }

          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