Ejemplo n.º 1
0
        protected void btnSaveEditFile_Click(object sender, EventArgs e)
        {
            // create file path
            string path = (string)ViewState["EditFile"];

            try
            {
                //update file
                int result = PutFileContents(path, ddlFileEncodings.SelectedValue, txtEditFileContent.Text);
                if (result < 0)
                {
                    messageBox.ShowResultMessage(result);
                    return;
                }
            }
            catch (Exception ex)
            {
                messageBox.ShowErrorMessage("FILES_UPDATE_FILE", ex);
            }

            // hide form
            EditFileModal.Hide();
            gvFiles.DataBind();
        }
Ejemplo n.º 2
0
 protected void btnCancelEditFile_Click(object sender, EventArgs e)
 {
     EditFileModal.Hide();
 }