PC Review


Reply
Thread Tools Rate Thread

ASP.NET 2 ICallbackEventHandler

 
 
Maya Nasri
Guest
Posts: n/a
 
      1st Nov 2005
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.


 
Reply With Quote
 
 
 
 
=?Utf-8?B?RXJpYyBXaXNl?=
Guest
Posts: n/a
 
      1st Nov 2005
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.
>
>
>

 
Reply With Quote
 
Maya
Guest
Posts: n/a
 
      2nd Nov 2005
You are a star!

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

thanks a alot.

Maya.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ICallbackEventHandler Slim Microsoft Dot NET 0 29th Jun 2006 02:25 PM
ICallbackEventHandler =?Utf-8?B?U2FsYW1FbGlhcw==?= Microsoft Dot NET Framework 2 5th Apr 2006 07:25 AM
ASP.NET 2.0 ICallbackEventHandler Lorenzo Soncini Microsoft ASP .NET 2 28th Dec 2005 05:31 PM
ASP.NET 2 ICallbackEventHandler Maya Nasri Microsoft ASP .NET 2 2nd Nov 2005 10:34 AM
ICallbackEventHandler Q???? JimGreen Microsoft ASP .NET 1 25th Oct 2005 02:30 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:24 AM.