inaccessible due to its protection level

10 views
Skip to first unread message

Hasham

unread,
Jul 26, 2006, 11:35:03 PM7/26/06
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Hi All,

I am in the way to upgrade my asp.net 1.1 app to asp.net2.0 . I have a
user control which contains a custom control for dropdownlist. The drop
downlist i sdefined in the .ascx file. The conversion wizard removed
the definition from .ascx.cs file where the control was defined as
protected.

Now this control is used in web pages in the same application. When I
am trying to access the dropdownlist control in the webfor i get th
error as "ControlSearch.usersDropDownList' is inaccessible due to its
protection level"

Can anybody help on how to get the code run. and also what is the
cause altough its declare protected and being used in the same
assembly.

Raj

unread,
Jul 28, 2006, 9:02:28 AM7/28/06
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Oh ...... in your control .... change private or protected to public
....

Raj ..

Tito

unread,
Jul 29, 2006, 10:39:51 PM7/29/06
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
I have also seen it where it won't even put the protected or private
there. It might just be the type. But I agree with Raj, make sure
that it is public.

Hasham

unread,
Jul 30, 2006, 1:11:02 AM7/30/06
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
thanks for the suggestions..

it does not allow me to change the access modifier after the conversion
is complete by vs2005 conversion wizard. well installing the upgrade
patch provided y MS has solved the purpose

IB

unread,
Aug 21, 2006, 3:07:21 PM8/21/06
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
What is the patch you are talking about? I am getting the same error..
Reply all
Reply to author
Forward
0 new messages