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
Steve Lutz - 23 Jul 2005 12:31 GMT
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
> Hi all...
>
[quoted text clipped - 16 lines]
>
> JS