Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. custom event handler problem

custom event handler problem

Scheduled Pinned Locked Moved ASP.NET
helpcsharpasp-netdatabasevisual-studio
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    ekynox
    wrote on last edited by
    #1

    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

    E 1 Reply Last reply
    0
    • E ekynox

      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

      E Offline
      E Offline
      ekynox
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups