473,320 Members | 1,900 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,320 software developers and data experts.

Protection level

I have the following event called from my DataGrid to my Code-Behind file.
I am using VS 2003

private void articleList_DeleteFile(Object sender, DataGridCommandEventArgs
e)
{
//First, get the filename to delete
string fileName = (string)articleList.DataKeys[e.Item.ItemIndex];

errorMessageLabel.Text = "You opted to delete the file " +
fileName + ".<br />" +
"This file could be deleted by calling: " +
"<code>File.Delete(fileName)</code><p>";

// You would want to rebind the Directory's files to the DataGrid after
// deleting the file...
}

But I am getting the following error:

CS0122: 'integration.WebForm1.articleList_ItemDataBound(ob ject,
System.Web.UI.WebControls.DataGridItemEventArgs)' is inaccessible due to its
protection level

I can fix the problem by changing it from private to public.

I get the same problem when I double click an object such as a radio button.
It jumps to my code page and sets up the event for me, but always uses
private that I have to change to public. Is there some directive I have to
set? Why doesn't VS know about this?

Thanks,

Tom
Sep 22 '06 #1
0 1254

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

Similar topics

75
by: Massimo | last post by:
I'm planning to develop a .NET application using C#, in order to sell it as a shareware and/or as a full package, so I'll need a good way to protect it against piracy. I know some ways to protect...
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...
7
by: Boni | last post by:
Dear all, in order to protect my assembly component from decompilation I implemented following schema: I created mixed mode C++ project wich has managed cProxy class and unmanaged cMemLoader....
3
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 ;...
1
by: musosdev | last post by:
Hi I've got a project I've just run through the conversion wizard, and it's giving me a few headaches. I've got a user control which has controls referrenced from its calling page...
0
by: Joe Reggae | last post by:
I know just enough about c# Windows forms development to be dangerous and am encountering a problem in VS2003 that I don't understand. In the class declaration of a form (which several forms...
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...
1
by: Nosferatum | last post by:
I need to query a database for users with password and retrieve these with a third variable, "level". That's easy. username, password, level If entered username and password exist, get these...
0
by: KhoaNguyen | last post by:
Hi, When i compiled these two source files, it gives me an error saying: Inaccesssible Due to its protection level. ------------Base Class----------------- using System; using...
0
by: Vinod Sadanandan | last post by:
STANDBY DATABASE MONITORING & PROTECION MODES (9iR2) This document is written for understanding and monitoring standby database configured with diffrent protection modes . MAXIMUM PROTECTION ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.