locked
How to notify a message to the server about a change in database RRS feed

  • Question

  • User-320914491 posted

    Hi everyone I am new to ASP.NET which is causing me a lot of problems in implementing my project. My project is to create a website for students to anonymously ask the prof. questions during the class. Basically I am able to create the website that maintains the list of questions. 
    Now the main problem is " HOW TO NOTIFY THE PROFESSOR DURING CLASS"
    The professor has a laptop connected to internet at all times. How can I send a notification message to the professor whenever a question is asked? I dont need a mail notification but I need to display a message in the task bar notification area.

    Please help me.

    Friday, April 16, 2010 11:30 AM

Answers

  • User-952121411 posted

    It sounds like this is just a project for school or something along those lines, so I would not implement any elaborate setup like I might if this was a key system for notifications in an enterprise environment.  If this is indeed true, the easiest way to show notifications is via the app itself with an AJAX timer that polls in the background and displays the message directly in the application.

    To create a system tray notification from ASP.NET might be difficult.  If there was any way to do something like this I would think it would be via JavaScript (browser messages only), but I did not see any solid solution to this (http://forums.asp.net/t/1446089.aspx); especially since this is an operation of the OS (Windows) and not the browser. Your easiest method would be to display the messages directly in the app.

    Another idea might be to use Silverlight which has more of a smart client look and feel with the ability to install the Silverlight app to the client.  This would give a nice hybrid solution to an app that is always connected.  You could use a WCF Duplex Service to push data to a Silverlight Client.  This is probably more work than you want to effort.

    For information on using an AJAX timer, check out the following:

    [How Do I:] Use the ASP.NET AJAX Timer Control?

    http://www.asp.net/learn/ajax-videos/video-99.aspx

    ...if you don't want to use AJAX and want something even simpler, you can use a thread timer:

    System.Threading.Timer:

    http://msdn.microsoft.com/en-us/library/system.threading.timer.aspx

    Hope this helps! Smile

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, April 19, 2010 2:43 PM

All replies

  • User-1659704165 posted

    Hi,

    http://www.asp.net/ajax/documentation/live/tutorials/IntroToTimerControl.aspx

    http://www.asp.net/AJAX/Documentation/Live/tutorials/TimerControlWithUpdatePanelsTutorial.aspx

    use Timer control Keep on Pooling every 10 sec or min then when find Record Give the Message


    Friday, April 16, 2010 12:46 PM
  • User-952121411 posted

    It sounds like this is just a project for school or something along those lines, so I would not implement any elaborate setup like I might if this was a key system for notifications in an enterprise environment.  If this is indeed true, the easiest way to show notifications is via the app itself with an AJAX timer that polls in the background and displays the message directly in the application.

    To create a system tray notification from ASP.NET might be difficult.  If there was any way to do something like this I would think it would be via JavaScript (browser messages only), but I did not see any solid solution to this (http://forums.asp.net/t/1446089.aspx); especially since this is an operation of the OS (Windows) and not the browser. Your easiest method would be to display the messages directly in the app.

    Another idea might be to use Silverlight which has more of a smart client look and feel with the ability to install the Silverlight app to the client.  This would give a nice hybrid solution to an app that is always connected.  You could use a WCF Duplex Service to push data to a Silverlight Client.  This is probably more work than you want to effort.

    For information on using an AJAX timer, check out the following:

    [How Do I:] Use the ASP.NET AJAX Timer Control?

    http://www.asp.net/learn/ajax-videos/video-99.aspx

    ...if you don't want to use AJAX and want something even simpler, you can use a thread timer:

    System.Threading.Timer:

    http://msdn.microsoft.com/en-us/library/system.threading.timer.aspx

    Hope this helps! Smile

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, April 19, 2010 2:43 PM