protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["hid"] == null && !Page.IsPostBack) { FVHaber.ChangeMode(FormViewMode.Insert); } }
protected void FVHaber_DataBound(object sender, EventArgs e) { if (FVHaber.CurrentMode == FormViewMode.Insert) { ((TextBox)FVHaber.FindControl("TbTarih")).Text = DateTime.Today.ToShortDateString(); } }
protected void LinkRSil_Click(object sender, EventArgs e) {//resim silniyor. if (!YetkiKontrol(pageName + "-Delete")) { return; } Snlg_DBConnect vt = new Snlg_DBConnect(true); int silinen = vt.SorguCalistir("UPDATE snlg_V1.TblHaberApp SET Resim = NULL WHERE HaberId = @HaberId ", System.Data.CommandType.Text, new Snlg_DBParameter[] { new Snlg_DBParameter("@HaberId", SqlDbType.Int, Request.QueryString["hid"]) }); vt.Kapat(); Snlg_Hata.ziyaretci.HataGosterBasarili("Resim silindi.", false); FVHaber.DataBind(); }