public var, but says Inaccessible due to protection level

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default public var, but says Inaccessible due to protection level

    I have a line:

    public System.Web.UI.HtmlControls.HtmlTable bldgInfo;


    Even though its public, for some reason every so often, .NET tells us that
    bldgInfo table is inaccessible due to the protection level. Its an html
    table -- but serverside. And it sits on a ascx (control).

    When we try to access that table from somewhere else, we get that error.

    Any ideas?

    Jason Shohet


    Jason Shohet Guest

  2. Similar Questions and Discussions

    1. Password protection on folder level
      Hi, I have setup password protection on the folder the user is publishing in- the point is to protect his content so only people authorized by...
    2. Control Level 0 MC from Level 1 Button?
      "haydenad" <haydenad@qis.net> wrote in message news:c0bfnh$ir1$1@forums.macromedia.com... level apply _level0.gotoAndPlay("Close"); hth
    3. Control Level 0 MC from Level 1 Button?
      This is probably an easy question but how do I control a Movie loaded in level 0 (I want to change frames) from a button that is loaded in Level 1?...
    4. FH Help files inaccessible in Mac Help Viewer
      Freehand MX comes with no printed manual so the online help files are crucial. In MacOSX 10.2 there is a help viewer that launches from the help menu...
    5. Encrypted files inaccessible after reinstalling OS
      After reinstalling Windows XP Pro over a previous installation (same operating system) my important encrypted files containing account information...
  3. #2

    Default Re: public var, but says Inaccessible due to protection level

    Where are you trying to access it from? Are you trying to access it from
    another page?

    Why?

    bill

    " Jason Shohet" <ash477@hotmail.com> wrote in message
    news:eB4sFc4VDHA.2032@TK2MSFTNGP11.phx.gbl...
    > I have a line:
    >
    > public System.Web.UI.HtmlControls.HtmlTable bldgInfo;
    >
    >
    > Even though its public, for some reason every so often, .NET tells us that
    > bldgInfo table is inaccessible due to the protection level. Its an html
    > table -- but serverside. And it sits on a ascx (control).
    >
    > When we try to access that table from somewhere else, we get that error.
    >
    > Any ideas?
    >
    > Jason Shohet
    >
    >

    William F. Robertson, Jr. Guest

  4. #3

    Default Re: public var, but says Inaccessible due to protection level

    Yes we're accessing it from another page. I figured out the problem, in
    that page the control has to have public in front of its declaration. But
    ..NET keeps changing it back to protected for some reason, and then it
    doesn't compile because the elements on that control are no longer
    accessible.... I change it to public, but .NET likes to set it back ;)


    Jason Shohet Guest

Posting Permissions

  • You may not post new threads
  • You may 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