ASP.NET 2 ICallbackEventHandler

Discussion in 'ASP .Net Web Controls' started by Maya Nasri, Nov 1, 2005.

  1. Maya Nasri

    Maya Nasri Guest

    Hello everyone,

    I have upgraded to ASP.NET 2 and since then i had the code below stopped
    working after upgrading and modiftying the code:

    using System;
    using System.Data;
    using System.Configuration;
    using System.Collections;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Web.UI.HtmlControls;


    public partial class test2 : System.Web.UI.Page, ICallbackEventHandler
    {
    protected void Page_Load(object sender, EventArgs e)
    {
    String cbReference =
    Page.ClientScript.GetCallbackEventReference(this,"arg", "ReceiveServerData",
    "context");

    }

    public String GetCallbackResult()
    {
    return "any thing";
    }



    public String RaiseCallbackEvent(String eventArgument)
    {
    String returnValue;

    if (catalog[eventArgument] == null)
    {
    returnValue = "-1";
    }
    else
    {
    returnValue = catalog[eventArgument].ToString();
    }

    return returnValue;
    }

    }

    I always get the following message:

    Error 1 'test2' does not implement interface member
    'System.Web.UI.ICallbackEventHandler.RaiseCallbackEvent(string)'.
    'test2.RaiseCallbackEvent(string)' is either static, not public, or has the
    wrong return type. c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary
    ASP.NET Files\clientfeatures\24208b06\718d08ed\App_Web_e2qwrp_y.0.cs 14

    I would be grateful if anyone has a solution for this.

    Thanks a lot,

    Maya.
    Maya Nasri, Nov 1, 2005
    #1
    1. Advertising

  2. Maya Nasri

    Eric Wise Guest

    I believe that raisecallbackevent needs to be of type void

    "Maya Nasri" wrote:

    > Hello everyone,
    >
    > I have upgraded to ASP.NET 2 and since then i had the code below stopped
    > working after upgrading and modiftying the code:
    >
    > using System;
    > using System.Data;
    > using System.Configuration;
    > using System.Collections;
    > using System.Web;
    > using System.Web.Security;
    > using System.Web.UI;
    > using System.Web.UI.WebControls;
    > using System.Web.UI.WebControls.WebParts;
    > using System.Web.UI.HtmlControls;
    >
    >
    > public partial class test2 : System.Web.UI.Page, ICallbackEventHandler
    > {
    > protected void Page_Load(object sender, EventArgs e)
    > {
    > String cbReference =
    > Page.ClientScript.GetCallbackEventReference(this,"arg", "ReceiveServerData",
    > "context");
    >
    > }
    >
    > public String GetCallbackResult()
    > {
    > return "any thing";
    > }
    >
    >
    >
    > public String RaiseCallbackEvent(String eventArgument)
    > {
    > String returnValue;
    >
    > if (catalog[eventArgument] == null)
    > {
    > returnValue = "-1";
    > }
    > else
    > {
    > returnValue = catalog[eventArgument].ToString();
    > }
    >
    > return returnValue;
    > }
    >
    > }
    >
    > I always get the following message:
    >
    > Error 1 'test2' does not implement interface member
    > 'System.Web.UI.ICallbackEventHandler.RaiseCallbackEvent(string)'.
    > 'test2.RaiseCallbackEvent(string)' is either static, not public, or has the
    > wrong return type. c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary
    > ASP.NET Files\clientfeatures\24208b06\718d08ed\App_Web_e2qwrp_y.0.cs 14
    >
    > I would be grateful if anyone has a solution for this.
    >
    > Thanks a lot,
    >
    > Maya.
    >
    >
    >
    Eric Wise, Nov 1, 2005
    #2
    1. Advertising

  3. Maya Nasri

    Maya Guest

    You are a star!

    never thought that i would need to modify a code retrieved from
    microsoft msdn site! :)

    thanks a alot.

    Maya.
    Maya, Nov 2, 2005
    #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. begemot

    ICallbackEventHandler and Mozilla

    begemot, Jun 21, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    1,231
    begemot
    Jun 22, 2005
  2. Maya Nasri

    ASP.NET 2 ICallbackEventHandler

    Maya Nasri, Nov 1, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    2,996
  3. Lorenzo Soncini

    ASP.NET 2.0 ICallbackEventHandler

    Lorenzo Soncini, Dec 28, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    1,755
    Lorenzo Soncini
    Dec 28, 2005
  4. ThatsIT.net.au

    ICallbackEventHandler problem in .net 4

    ThatsIT.net.au, Dec 26, 2009, in forum: ASP .Net
    Replies:
    0
    Views:
    426
    ThatsIT.net.au
    Dec 26, 2009
  5. Maya Nasri

    ASP.NET 2 ICallbackEventHandler

    Maya Nasri, Nov 1, 2005, in forum: ASP .Net Web Services
    Replies:
    2
    Views:
    141
Loading...

Share This Page