I used me for an afternoon, I finally finished writing and organizing materials using .NET to send instant messages (of course, there is a morning database design :) Database design: info table: ID fromstu_id Tostu_id Content Term where ID is the primary key , Fromstu_id is a school number of the user who sends information (this is the recording of my friends who I do), and the TOSTU_ID is the user of the user who accepts information. Content is the content of the message, and TERM is a new message. The following code home is in the if not ispostback in the alumni record '/ Judging whether there is a new message, and the automatic pop-up page will also set the page refresh time to cycle.
Dim mysql As String = "select * from info where tostu_id = @ myid and term = 1" Dim comm As SqlCommand = New SqlCommand (mysql, conn) comm.Parameters.Add (New SqlParameter ( "@ myid", SqlDbType.Int, 4) ("@ myid"). Value = session ("stu_id" DIM DR AS SQLDATAREADER Conn () DR = Comm.executeReader if Dr.Read Then Response.write ("