473,473 Members | 2,169 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 17 '05 #1
2 3111
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 17 '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 17 '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 in Visual Web Developer 2005 express beta (framework version )the source code using System; using System.Web.UI; using System.Web.UI.WebControls; using...
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...
1
by: JimGreen | last post by:
I recently installed Release Candidate of VS2005 and I am not sure what the hell is the problem but ICallbackEventHandler definition on my machine looks like this: public interface...
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: Ben Schumacher | last post by:
I have a page that implements ICallbackEventHandler. I'm trying to accomplish auto saving a page everytime the user navigates away from the page. To initialize the callback, I fire the onunload...
1
by: =?Utf-8?B?RGF2aWQgUmVoYWdlbg==?= | last post by:
I currently have a custom control that implements the ICallbackEventHandler interface. Currently it works when the control is added to a standard web form. It does not work however when added to...
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
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.