protected void cmdGuardar_Click(object sender, EventArgs e) { int id = Convert.ToInt32(Request.Params["id"]); objCommentMN = new ModeloNegocio.Comment(); objCommentLN = new LogicaNegocio.Comment(); String IPAdd ; IPAdd = Request.UserHostAddress; //If String.IsNullOrEmpty(IPAdd) Then // IPAdd = Request.ServerVariables("REMOTE_ADDR") // lblIPBehindProxy.Text = IPAdd //End If objCommentMN.CommentContent = txtComentario.Text; objCommentMN.EmailAuthor = txtEmail.Text; objCommentMN.IdCotent = id ; objCommentMN.IpAuthor = IPAdd; objCommentLN.insertComment(objCommentMN); string strRedirect; strRedirect = "noticia-detalle.aspx?id=" + id.ToString(); Response.Redirect(strRedirect, true); }
protected void cmdGuardar_Click(object sender, EventArgs e) { int id = Convert.ToInt32(Request.Params["id"]); objCommentMN = new ModeloNegocio.Comment(); objCommentLN = new LogicaNegocio.Comment(); String IPAdd; IPAdd = Request.UserHostAddress; //If String.IsNullOrEmpty(IPAdd) Then // IPAdd = Request.ServerVariables("REMOTE_ADDR") // lblIPBehindProxy.Text = IPAdd //End If objCommentMN.CommentContent = txtComentario.Text; objCommentMN.EmailAuthor = txtEmail.Text; objCommentMN.IdCotent = id; objCommentMN.IpAuthor = IPAdd; objCommentLN.insertComment(objCommentMN); string strRedirect; strRedirect = "noticia-detalle.aspx?id=" + id.ToString(); Response.Redirect(strRedirect, true); }