![]() |
|
|
|||||||
![]() |
ASP Net - ASP.NET 2 ICallbackEventHandler |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
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. Maya Nasri |
|
|
|
|
#2 |
|
Posts: n/a
|
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. > > > =?Utf-8?B?RXJpYyBXaXNl?= |
|
|
|
#3 |
|
Posts: n/a
|
You are a star!
never thought that i would need to modify a code retrieved from microsoft msdn site! thanks a alot. Maya. Maya |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| viewstate MAC failed in asp.net 2.0 while postback the page | azraffarveen | Software | 0 | 05-12-2009 03:24 PM |
| .NET 2.0 Web Apps / .NET 3.5 ASP.NET Apps - Differences/Similariti | london1919 | MCTS | 1 | 12-08-2008 03:16 PM |
| ASP.NET: Asign Users in Roles(Array.IndexOf(Of String) method) | msandlana | Software | 0 | 04-25-2008 06:37 AM |
| ASP.NET deadlock | viktoria | Software | 0 | 07-05-2007 02:53 AM |
| ASP.NET 2.0 application does not run in WIN2k3 | johnfraj | Software | 0 | 04-19-2007 08:27 AM |