Hi,
I am trying to implement something like a inbox for messages(in
ASP.NET/C#/MS SQL SERVER) which are stored in a table in a data base.
this is the table:
CREATE TABLE Messages
(
MssgID INT IDENTITY(1,1) PRIMARY KEY CLUSTERED,
EstateID INT NOT NULL
FOREIGN KEY (EstateID) REFERENCES Estates(EstateID)
ON DELETE CASCADE,
UserID INT NOT NULL
FOREIGN KEY (UserID) REFERENCES Users(UserID)
ON DELETE CASCADE,
MssgTxt VARCHAR(255) NOT NULL,
MssgDate SMALLDATETIME NOT NULL,
ParentKey INT
FOREIGN KEY (ParentKey) REFERENCES ESTATE.BLEK.Messages(MssgID)
Read CHAR(1)
)
I use the field Read to check if the message is already read, like a flag ,
you know. What I would like to do is when a user Log In , he/she must see
the count of the new messages than he/she could goes in his/her inbox and
see all messages, but the new must be on top and must be in different
colors. Do you have any idea how could I show the messages, with Repeater or
Datagrid? And which is more important how could I differ the new messages
from the old messages?
Any help would be apriciated!
Thank yo in advance!
Viktor
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.752 / Virus Database: 503 - Release Date: 03.9.2004 a.