473,385 Members | 1,582 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

...is inaccessible due to its protection level. ?

Hi,

I have this inside a webusercontrol:
private string MenuItem = new string[2];

Inside the .ascx file I do this:
<%= MenuItem(0) %>

And I get this error:
....is inaccessible due to its protection level

I have changed private to public and even removed it... I always get the
same error.

Can somebody help me?

Thanks!
Nov 19 '05 #1
1 2565
Hmmm, found it with <%= MenuItem[0] %> and public

Now I get this error when doing this: MenuItem[x] = "";
Compiler Error Message: CS0200: Property or indexer 'string.this[int]'
cannot be assigned to -- it is read only

"Arjen" <bo*****@hotmail.com> schreef in bericht
news:d8**********@news3.zwoll1.ov.home.nl...
Hi,

I have this inside a webusercontrol:
private string MenuItem = new string[2];

Inside the .ascx file I do this:
<%= MenuItem(0) %>

And I get this error:
...is inaccessible due to its protection level

I have changed private to public and even removed it... I always get the
same error.

Can somebody help me?

Thanks!

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: BlueOysterCult | last post by:
Hello I can't get around the error "inaccessible due to its protection level" - it points at a line that I am using .Sort() and BinarySearch() - but the real problem lies in another part of the...
1
by: Larry | last post by:
Thanks in advanced for your help I've added a TextBox1 and Button1 to a form in C# in VS.net 2003. When I double click on the Button1 at design time, a private method ButtonClick. I've...
1
by: Larry | last post by:
I have a VB background and am developing a new windows app in Csharp. I'm getting the error. 'inaccessible due to its protection level' I've added a TextBox1 and a Button1 to a form. I...
1
by: Chris | last post by:
Hi, New to C# programming. I'm trying to implement some simple security in my website. Basically a user cannot surf to secured aspx pages simply by accessing them directly through the address...
3
by: tshad | last post by:
I am getting a message for my objects that say: testNulls.cs(13,33): error CS0122: 'FtsData.IntType.IntType()' is inaccessible due to its protection level I have a class calling objects out of...
2
by: Jason Shohet | last post by:
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...
2
by: sck10 | last post by:
Hello, I am getting the following error: fvServiceIdea_ItemUpdating_Validate(object, System.Web.UI.WebControls.FormViewUpdateEventArgs)' is inaccessible due to its protection level. Below...
5
by: Iain | last post by:
Hi All I have the code below (Using Delphi 2006 Developer to create an C# ASP.Net page to update a simple database table. When the page is fired I get the following error message ...
6
by: milund | last post by:
I have a "funny" after upgrading to .NET2.0. The following code is placed inside an unsafe method in assembly "A" System.Object myIUnknownObject =...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.