protected void Page_Load(object sender, EventArgs e) { enty.Mesaj msg = Mesajs.MesajGetir(int.Parse(Request.QueryString["MesajId"])); LabelAd.Text = msg.Ad; LabelSoyad.Text = msg.Soyad; LabelIpAdres.Text = msg.IpAdres; LabelMailAdres.Text = msg.Mail; LabelMesajTarihi.Text = msg.MesajTarihi.ToString(); LiteralMesaj.Text = msg.GonderilenMesaj; }
protected void BtnGonder_Click(object sender, EventArgs e) { Mesaj msg = new Mesaj(); msg.Ad = txtIsım.Text; msg.Soyad = txtSoyad.Text; msg.Mail = txtMail.Text; msg.GonderilenMesaj = txtMesaj.Text; Mesajs.MesajGonder(msg); txtIsım.Text = txtMail.Text = txtMesaj.Text = txtSoyad.Text = string.Empty; LtrBilgi.Text = "<span class=\"nicdark_second_font nicdark_bg_green nicdark_padding_5 nicdark_border_radius_3 nicdark_color_white nicdark_display_inline_block\">Message sent to us.<br>Thank You For This.</span>"; }
protected void GridViewMesajlar_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Sil") { Mesajs.MesajSil(int.Parse(e.CommandArgument.ToString())); GridViewMesajlar.DataBind(); } else if (e.CommandName == "Detay") { Response.Redirect("/Yonetim/Default.aspx?go=MesajDetay&MesajId=" + e.CommandArgument); } }