method is inaccessible due to its protection level

Discussion in 'ASP .Net' started by sck10, Aug 28, 2006.

  1. sck10

    sck10 Guest

    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);

    }
     
    sck10, Aug 28, 2006
    #1
    1. Advertising

  2. sck10

    KJ Guest

    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);
    >
    > }
     
    KJ, Aug 28, 2006
    #2
    1. Advertising

  3. sck10

    sck10 Guest

    Thanks KJ...


    "KJ" <> wrote in message
    news:...
    > 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);
    >>
    >> }

    >
     
    sck10, Aug 28, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jason Shohet
    Replies:
    1
    Views:
    484
    William F. Robertson, Jr.
    Aug 1, 2003
  2. Arjen
    Replies:
    1
    Views:
    5,073
    Arjen
    Jun 11, 2005
  3. Iain
    Replies:
    5
    Views:
    635
    =?Utf-8?B?TWlsb3N6IFNrYWxlY2tpIFtNQ0FEXQ==?=
    Feb 20, 2007
  4. Walter Wang [MSFT]
    Replies:
    2
    Views:
    1,266
    Walter Wang [MSFT]
    Jan 19, 2007
  5. Chip Gore
    Replies:
    6
    Views:
    2,216
    Ben Voigt [C++ MVP]
    Apr 10, 2008
Loading...

Share This Page