Exemple #1
0
        /////////////////////////////
        protected void Tweet_RowDelete_Click(Object sender, GridViewDeleteEventArgs e)
        {
            // Retrieve the row that raised the event from the Rows
            // collection of the GridView control.
            GridViewRow row = modifyTweet.Rows[e.RowIndex];
            //get roll number from that row
            String tweetid = row.Cells[1].Text;

            //Call the DAL function to delete the student with this roll number
            enter obj = new enter();

            if (obj.DeleteTweet(tweetid) == 1)
            {
                Message.Text = "TweetID =" + tweetid + " was Deleted";
                loadGrid(); //reload the grid to show the modifications in table
            }
            else
            {
                Message.Text = "there was some error";
            }
        }