예제 #1
0
    protected void FilesGrid_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        string  fullFileName        = FilesGrid.DataKeys[e.RowIndex].Value.ToString();
        TextBox FileContentsTextBox = LoginViewForFileContentsTextBox.FindControl("FileContents") as TextBox;

        FileContentsTextBox.Text = string.Format("You have opted to delete {0}.", fullFileName);
    }
예제 #2
0
    protected void FilesGrid_SelectedIndexChanged(object sender, EventArgs e)
    {
        //open the file and display it
        string  fullFileName        = FilesGrid.SelectedValue.ToString();
        string  contents            = File.ReadAllText(fullFileName);
        TextBox FileContentsTextBox = LoginViewForFileContentsTextBox.FindControl("FileContents") as TextBox;

        FileContentsTextBox.Text = contents;
    }