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

ASP.NET 2 ICallbackEventHandler

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.RaiseCallback Event(string)'.
'test2.RaiseCallbackEvent(string)' is either static, not public, or has the
wrong return type. c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temp orary
ASP.NET Files\clientfeatures\24208b06\718d08ed\App_Web_e2q wrp_y.0.cs 14

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

Thanks a lot,

Maya.
Nov 19 '05 #1
2 1059
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.RaiseCallback Event(string)'.
'test2.RaiseCallbackEvent(string)' is either static, not public, or has the
wrong return type. c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temp orary
ASP.NET Files\clientfeatures\24208b06\718d08ed\App_Web_e2q wrp_y.0.cs 14

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

Thanks a lot,

Maya.

Nov 19 '05 #2
You are a star!

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

thanks a alot.

Maya.

Nov 19 '05 #3

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

Similar topics

1
by: Mike | last post by:
When trying to compile (using Visual Web Developer 2005 Express Beta; frameworkv2.0.50215 ) the source code below I get errors (listed below due to the use of ICallBackEventHandler. Ultimately I...
2
by: Maya Nasri | last post by:
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...
3
by: Harvey Triana | last post by:
Hello I try to implement ICallbackEventHandler follow sample in http://msdn2.microsoft.com/en-us/library/ms178208.aspx I add code line: Implements System.Web.UI.ICallbackEventHandler The...
0
by: Slim | last post by:
I made a page today that uses ICallbackEventHandler. I got to work, but with problems. 1. it is slow, it does not seem any faster than reloading the page. 2. the first time I fire the event it...
1
by: Ian | last post by:
Question: Is there a way to multi-thread ICallbackEventHandler using delegates? Problem: I'm executing client-side calls to my page, which implements ICallbackEventHandler. I need to implement...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.