Professional Web Applications Themes

Why can I not access with loop through and ME a WebControl? - ASP.NET General

"Andreas Klemt" <com> wrote in message news:phx.gbl...  Andreas, I think you may be missing some of the responses to your posts here. This one has been answered. btn1 is not in Me.Controls, so you won't find it there. The only thing in Me.Controls is the HtmlForm and maybe some LiteralControls containing other HTML. Inside of the HtmlForm is an HtmlTable control called myTable. Now, I don't know what's in its Controls collection, since your TR and TD elements are not server-side (runat="server"). If they were, there would be an HtmlTableRow inside of the HtmlTable, and an HtmlTableCell within the HtmlTableRow. ...

  1. #1

    Default Re: Why can I not access with loop through and ME a WebControl?

    "Andreas Klemt" <com> wrote in message
    news:phx.gbl... 

    Andreas, I think you may be missing some of the responses to your posts
    here. This one has been answered.

    btn1 is not in Me.Controls, so you won't find it there. The only thing in
    Me.Controls is the HtmlForm and maybe some LiteralControls containing other
    HTML. Inside of the HtmlForm is an HtmlTable control called myTable.

    Now, I don't know what's in its Controls collection, since your TR and TD
    elements are not server-side (runat="server"). If they were, there would be
    an HtmlTableRow inside of the HtmlTable, and an HtmlTableCell within the
    HtmlTableRow.

    Within the Controls collection of the HtmlTableCell is your button.

    I hope this helps.

    P.S. No offense intended, but you seem to be among many recent posters who
    do not attempt to discover the answers to questions like this on their own.
    I am increasingly concerned that there may be some actual, good reason for
    this, that is, I do not believe that "laziness" can be the reason for so
    many different people to not try to find out.

    I would be interested to know if there is some reason you just didn't go
    examine the Controls collection in the debugger. I'm concerned that more
    than one person may share your reason, and that resolving your reason will
    resolve it for others.
    --
    John Saunders
    Internet Engineer
    com


    John Guest

  2. Moderated Post

    Default Re: Why can I not access with loop through and ME a WebControl?

    Removed by Administrator
    John Guest
    Moderated Post

  3. Moderated Post

    Default Re: Why can I not access with loop through and ME a WebControl?

    Removed by Administrator
    Andreas Guest
    Moderated Post

Similar Threads

  1. Custom webcontrol that references another webcontrol
    By Fabricio in forum ASP.NET Building Controls
    Replies: 0
    Last Post: September 21st, 02:55 AM
  2. WebControl inside of WebControl and attaching events
    By Kasabaarde Sumta in forum ASP.NET Building Controls
    Replies: 0
    Last Post: December 13th, 09:51 PM
  3. Can a webcontrol (webcontrol.dll) have a configuration file?
    By Luis Ramírez. in forum ASP.NET Building Controls
    Replies: 2
    Last Post: July 6th, 04:35 PM
  4. Access WebControl in custom control
    By William Leary in forum ASP.NET Building Controls
    Replies: 1
    Last Post: October 8th, 08:28 PM
  5. Replies: 1
    Last Post: July 20th, 05:27 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139