ASP.NET 2 ICallbackEventHandler

M

Maya Nasri

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.
 
M

Maya

You are a star!

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

thanks a alot.

Maya.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top