 finally block closes the connection ,dispose the command and dispose the connection.DataBind method will bind the data to the table in GridView.  0.Add the parameters to add the textbox values to the command object .  using try,catch ,finally blockshere inorder to handle errors in a block of code.In this try block, connection is openedto connect to sqlserver ,executes the query and the finally block closes the connection ,dispose the command and dispose the connection. DataBind method will bind the data to the table in GridView.  