protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { try { id_mensaje = Seguridad.Id_cript_cadena(Encriptador.Desencriptar_Md5(Request.QueryString["id"].ToString())); string direccion_retorno = Session["MensajeriaPrevia"].ToString(); usuario user = new usuario(); string sql = "SELECT leido From mensajeria WHERE id_mensaje Like '" + id_mensaje + "'"; user.IniciarConexion(); List<object> obj = user.Get_Consulta(sql); object[] msj = (object[])obj[0]; if (Convert.ToInt32(msj[0].ToString()) == 0) user.MensajeLeido(id_mensaje); else user.MensajeLeido(id_mensaje, 0); user.CerrarConexion(); Response.Redirect(direccion_retorno, true); } catch { } } }
/* <div class="stripe-separator"><!-- --></div> <blockquote>This is a blockquote followed by a cite tag. And no matter how much text you put in this, it will automatically resize.</blockquote> <cite>- John</cite>*/ protected void CargarMensaje() { usuario user = new usuario(); //id_usuario_de , nombre , asunto , mensaje , leido List<object> ObjMensaje = user.VerMensaje(id_mensaje); if (ObjMensaje.Count >= 1) { object[] Obj = (object[])ObjMensaje[0]; id_usuario_de = Obj[0].ToString(); tablon_de.InnerHtml = "<h3>" + Obj[1].ToString() + "</h3>"; tablon_mensaje.InnerHtml = "<div class='stripe-separator'><!-- --></div>"; tablon_mensaje.InnerHtml += "<h3>Asunto: " + Obj[2].ToString() + "</h3>"; tablon_mensaje.InnerHtml += "<div class='stripe-separator'><!-- --></div>"; tablon_mensaje.InnerHtml += "" + Obj[3].ToString() + ""; tablon_mensaje.InnerHtml += "<div class='stripe-separator'><!-- --></div>"; tablon_mensaje.InnerHtml += "<cite><a class='round button blue text-upper ' href='mensaje.aspx?id=" + id_usuario_de + "'>Contestar Mensaje</a></cite>"; if (Convert.ToInt32(Obj[4].ToString()) == 0) user.MensajeLeido(id_mensaje); } }