473,492 Members | 4,279 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

method is inaccessible due to its protection level

Hello,

I am getting the following error:

fvServiceIdea_ItemUpdating_Validate(object,
System.Web.UI.WebControls.FormViewUpdateEventArgs) ' is inaccessible due to
its protection level.

Below is what I am using, so I don't understand what level of protection is
being used. Any assistance with this would be greatly appreciated.

Thanks, sck10
void fvServiceIdea_ItemUpdating_Validate(object sender,
FormViewUpdateEventArgs e)
{
if (e.NewValues["ServiceIdeaName"].ToString() == "")
{
e.Cancel= true;
this.lblMessageText.Text += "<span class='RedM'>Service Idea
Name</span>: is Missing.<br />";
}

if (e.Cancel == true) ShowMessage(this.lblMessageTitle.Text,
this.lblMessageText.Text);

}


Aug 28 '06 #1
2 6931
KJ
Methods that are not explicitly marked otherwise (such as yours) are
private.

Change your code to:

protected void fvServiceIdea_ItemUpdating_Validate ....

sck10 wrote:
Hello,

I am getting the following error:

fvServiceIdea_ItemUpdating_Validate(object,
System.Web.UI.WebControls.FormViewUpdateEventArgs) ' is inaccessible due to
its protection level.

Below is what I am using, so I don't understand what level of protection is
being used. Any assistance with this would be greatly appreciated.

Thanks, sck10
void fvServiceIdea_ItemUpdating_Validate(object sender,
FormViewUpdateEventArgs e)
{
if (e.NewValues["ServiceIdeaName"].ToString() == "")
{
e.Cancel= true;
this.lblMessageText.Text += "<span class='RedM'>Service Idea
Name</span>: is Missing.<br />";
}

if (e.Cancel == true) ShowMessage(this.lblMessageTitle.Text,
this.lblMessageText.Text);

}
Aug 28 '06 #2
Thanks KJ...
"KJ" <n_**********@mail.comwrote in message
news:11**********************@p79g2000cwp.googlegr oups.com...
Methods that are not explicitly marked otherwise (such as yours) are
private.

Change your code to:

protected void fvServiceIdea_ItemUpdating_Validate ....

sck10 wrote:
>Hello,

I am getting the following error:

fvServiceIdea_ItemUpdating_Validate(object,
System.Web.UI.WebControls.FormViewUpdateEventArgs )' is inaccessible due
to
its protection level.

Below is what I am using, so I don't understand what level of protection
is
being used. Any assistance with this would be greatly appreciated.

Thanks, sck10
void fvServiceIdea_ItemUpdating_Validate(object sender,
FormViewUpdateEventArgs e)
{
if (e.NewValues["ServiceIdeaName"].ToString() == "")
{
e.Cancel= true;
this.lblMessageText.Text += "<span class='RedM'>Service Idea
Name</span>: is Missing.<br />";
}

if (e.Cancel == true) ShowMessage(this.lblMessageTitle.Text,
this.lblMessageText.Text);

}

Aug 28 '06 #3

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

Similar topics

1
545
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
5060
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
17208
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
2214
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...
2
2954
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...
1
4146
by: Ken.r | last post by:
I'm working my way throught ASP Resource Kit tutorial lab 3. This following code was working in the HTML page: private void btnSignIn_Click(object sender, System.EventArgs e) { // Add user...
1
2573
by: Arjen | last post by:
Hi, I have this inside a webusercontrol: private string MenuItem = new string; Inside the .ascx file I do this: <%= MenuItem(0) %> And I get this error: ....is inaccessible due to its...
3
2365
by: xenophon | last post by:
This following innocuous code: System.IO.DirectoryInfo fff = new System.IO.DirectoryInfo(); System.IO.FileInfo ppp = fff.GetFiles( Request.MapPath(".") ); for( int ccc=0 ; ccc < ppp.Length ;...
6
13330
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
7118
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
7192
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...
0
7364
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4886
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4579
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1397
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
637
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
282
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.