Click here to Skip to main content
13,045,790 members (47,437 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Kindly let me know steps required to achieve the following scenario:
I have to create a application with two login IDs for user1 and user2... now when user1 logs in he types a message for user2 and user2 will receive this message as a notification message. User2 cannot directly reply back to user1 but can type and send another notification message to user2 which will appear as a popup in user1 side....
Posted 21-Sep-12 2:46am
Updated 21-Sep-12 2:48am
Tejas Vaishnav 21-Sep-12 9:07am
can you try push notification services concept....

i think it will solve your problem.
Sandeep Mewara 21-Sep-12 9:14am
What do you think on how it should be done? Tried anything?

It's a different kind of chat on web you are talking of... actually, half of what actual chat is.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

1) User 1 and user 2 are using an ASP.NET web application connected to an SQL Server database.

1) Create a table in the database where sent messages are stored. The table should include a recieved bit field with a 0 default.

2) The application has a form used to send messages to the database for the intended user.

2) Using ajax, the application can use a stored procedure to check the database at intervals of your choosing (every 30 seconds or what ever you want) for messages sent by the other user that have not been recieved (still 0).

3) The stored procedure will set the received bit to 1 and return the messages to the application.

4) If messages are returned, the ajax will generate a popup to display them.

Good luck!
sp1786 22-Sep-12 5:19am
What fields do i add in database table?
DaveP62 25-Sep-12 8:58am
Based upon the requirements given it doesn't seem like the table needs a lot of fields. Assuming the application will be as simple as the requirements suggest the following fields should work:
MessageId (Integer) -- Identity field auto-incremented
FromUser (VarChar(64)) -- The name of the user sending the message
ToUser (VarChar(64)) -- The name of the user who will receive the message
MessageText (VarChar(2048)) -- The message being sent
Received (bit) -- Default = 0

You can add as many other fields as you like depending on how you use and how much functionality you want the application to have.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 21 Sep 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100