// Imposta modalità display, utilizzo template unico per create/edit protected void SetDisplayMode() { // Se richiamato con parametro imposta la modalità Edit e cambia il CommandNae del tasto "Salva" // Usato per non duplicate i template nella FormView a fronte degli stessi controlli if (!IsPostBack && Request.QueryString["CalendarHolidays_id"] != null && FVForm.CurrentMode == FormViewMode.Insert) { FVForm.ChangeMode(FormViewMode.Edit); FVForm.DefaultMode = FormViewMode.Edit; Button btn = (Button)FVForm.FindControl("UpdateButton"); if (btn != null) { btn.CommandName = "Update"; } } }