custom event handler problem
-
g'day folks, i'm having a small issue with regards to custom event handlers in my web service. I'm trying to create a custom event handler whose purpose is to display messages on the web form as a particular method is executed via the web service. For instance, lets assume that the web method generates a report from a database then my eventhandler would update on the web form indicating which aspects of the report has been generated. Initially I thought let's do it the standard way as you would in a standard console application as follows: public delegate void ReportGenerationProgressEventHandler(string x); public event ReportGenerationProgressEventHandler myReportGenerationHandler; The above can be instantiated as follows: myReportGenerationHandler+= new ReportGenerationProgressEventHandler (Service_myReportGenerationHandler); In my webservice if I just declare the delegate and event types as above. Then instantiate an object of my webservice in the webform I do not get an option to create my report progress eventhandler via intellisense. I have tried google but most disscusions tends to be focused on custom events for custom controls unless I go write a custom control which I think will not be appropriate in my case at all. Is there an alternative method of achieving the same result in asp.net ? thanks edit: mistake in code
-
g'day folks, i'm having a small issue with regards to custom event handlers in my web service. I'm trying to create a custom event handler whose purpose is to display messages on the web form as a particular method is executed via the web service. For instance, lets assume that the web method generates a report from a database then my eventhandler would update on the web form indicating which aspects of the report has been generated. Initially I thought let's do it the standard way as you would in a standard console application as follows: public delegate void ReportGenerationProgressEventHandler(string x); public event ReportGenerationProgressEventHandler myReportGenerationHandler; The above can be instantiated as follows: myReportGenerationHandler+= new ReportGenerationProgressEventHandler (Service_myReportGenerationHandler); In my webservice if I just declare the delegate and event types as above. Then instantiate an object of my webservice in the webform I do not get an option to create my report progress eventhandler via intellisense. I have tried google but most disscusions tends to be focused on custom events for custom controls unless I go write a custom control which I think will not be appropriate in my case at all. Is there an alternative method of achieving the same result in asp.net ? thanks edit: mistake in code
Just to answer my own question and for anyone else's benefit. Well it seems that web services in .net doesnt support eventing even though there is a specification,[^] , from the W3C committee that web services should support eventing. The only other option will be to use WCF however platform compatability will be an issue.