Solved

Event subscription between base classes C# ASP.Net 2.0

Posted on 2007-04-04
2
197 Views
Last Modified: 2013-11-07
We have an aspx page which we would like to subscribe to an event raised by a business layer class.  The aspx page inherits from a presentation layer base class.  The business layer class also inherits from a business layer base class which defines and throws the event we wish to subscribe to.

The presentation base class currently subscribes to the event.  Our idea is that once the event is fired in the business layer base class, it will be picked up by the presentation layer base class and will subsequently be passed on to the aspx class.  However this does not work.

When we subscribe to the event from the aspx page (rather than the presentation base class) the event is picked up as expected.

Note that the event handler execution is located in the presentation base class.

We would like the presentation base class subscribe directly to the event and handle the event as well, bypassing the need for all of our aspx pages to subscribe to the event.

0
Comment
Question by:CLoucas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 12

Accepted Solution

by:
ShazbotOK earned 250 total points
ID: 18851516
Not really sure if what your proposing to do can be done on ASP.NET without the use of ActiveX..  the bussiness tier is defined as a "server side"  and the presentation tier is defined as "client side" - the problem is that the client side being hosted in a browser is in a connectionless state so it would never receive an event fired by the business tier.

A workaround to this could be to that when the business tier fires the event that the ASPX code-behind saves the event value to the ApplicationState (or to a DataSource).  Once this is done you could write your code into the postback to check for that value before any action is performed (or @ designated action).  However this would only display on client side when the post-back request is performed.
0
 
LVL 9

Assisted Solution

by:ripahoratiu
ripahoratiu earned 250 total points
ID: 18897587
... or to have a "ping" invisible page that requests from time to time for the completion of event, stored in session or application...
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question