Global Messaging (maybe Global Events?)

J

jrstutz

Hi all...

I'm pretty new to ASP.NET applications, but have some experience as a
Windows appliation developer. In an ASP.NET solution we're coding, we'd
like be able to create a user control that can intercept "messages"
from our other business classes / user controls to be displayed to the
User.

The approach we've been (unsuccessfully) taking, is to create some sort
of global event that can be triggered by any of our business objects /
user controls. The event could then be monitored by the Message Display
user control for display.

Is this even possible? Is there a better way to accomplish what we're
trying to do? I'm not necessarily looking for a complete solution, but
a shove in the right direction would be awesome.

TIA

JS
 
S

Steve Lutz

Questions about the messages:
1) Are they supposed to live across requests?
2) Are messages to specific user or to ALL users?
3) Are you intercepting messages, or just receiving them?

If you just want a simple message queue that lives through-out a request,
then you can create it in System.Web.HttpContext.Current and add items to
it. It goes away after the request is completed

If you want it to live through-out a user's session, you can stick the
messages in the Session as a session variable.

If messages are to multiple users, spanning multiple http requests and
multiple sessions, I'd suggest a database solution.

HTH
Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top