Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > method is inaccessible due to its protection level

Reply
Thread Tools

method is inaccessible due to its protection level

 
 
sck10
Guest
Posts: n/a
 
      08-28-2006
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);

}




 
Reply With Quote
 
 
 
 
KJ
Guest
Posts: n/a
 
      08-28-2006
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);
>
> }


 
Reply With Quote
 
 
 
 
sck10
Guest
Posts: n/a
 
      08-28-2006
Thanks KJ...


"KJ" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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);
>>
>> }

>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"is inaccessible due to its protection level" using a public methodof a public class Chip Gore C++ 6 04-10-2008 10:07 PM
function is inaccessible due to its protection Iain ASP .Net 5 02-20-2007 07:02 PM
RE: Settings inaccessible due to its protection level Walter Wang [MSFT] ASP .Net 2 01-19-2007 05:49 AM
...is inaccessible due to its protection level. ? Arjen ASP .Net 1 06-11-2005 04:52 PM
public var, but says Inaccessible due to protection level Jason Shohet ASP .Net 1 07-31-2003 11:51 PM



Advertisments