1: <tr id="trReaded_<%#Eval("RecordID") %>" class="<%#getReadClass(Eval("IsRead").ToString()) %>"
2: onclick="MarkMsgRead(<%#Eval("RecordID") %>)">
1: if (Request.QueryString["MsgID"] != null)
2: {
3: if (this.changeTrue(msgID))
4: {
5: // Response. Write (msgID + "; modified successfully ");
6: string customerID = myShare.GetAObject(true, 0, "CustomerID", "Customers", "UserID='" + Session["UserID"].ToString() + "'").ToString();
7: int ReceiverID = int.Parse(customerID);
8: string lblMsgCount = "";
9: lblMsgCount = myShare.GetAObject(true, 0, "count(RecordID)", "MessagesRecord", "IsRead=0 and Deleted=0 and Receiver = " + customerID).ToString();
10: }
11: else
12: {
13: Response. Write (msgID + "messnoread; modification failed ");
14: }
15: }
Function MarkMsgRead (pRecordID) {try {xmlHttp = new ActiveXObject ("Msxml2.XMLHTTP");} catch (err1) {try {xmlHttp = new ActiveXObject ("Microsoft. XMLHTTP ");} catch (err2) {xmlHttp = new XMLHttpRequest () ;}// var mUrl =" SyschangeStyle. aspx? MsgID = "+ pRecordID; xmlHttp. open ("GET", mUrl, true); xmlHttp. onreadystatechange = OnHandlerMsg; xmlHttp. send (null);} function OnHandlerMsg () {// 0 (uninitialized): (XMLHttpRequest) the object has been created, but the open () method has not been called. // 1 (load): the open () method has been called, but no request has been sent. // 2 (Load completed): The request has been sent. // 3 (interaction): Some response data can be received. // 4 (complete): all data is received and the connection is closed. If (xmlHttp. readyState = 4) {var isValid = xmlHttp. responseText; var mTrID = isValid. substring (0, isValid. indexOf (';'); var mTrReadID = "trReaded _" + mTrID; var exists = document. getElementById (mTrReadID); exists. removeAttribute ("class ")}}