I am new in sharepoint development. I have 2 webparts attached on a page. The first webpart (MyTestingWebpart1) basically it does only inserting of data and the other webpart (MyTestingWebpart[2]) displays the records from the database. Now my problem is when I try to click on the save button, somehow I don’t know how to refresh the webpart that displays the newly inserted record. Is this possible?
I have added a query at the page load event of MyTestingWebPart[2]. Both of the webparts attached are web user controls. Thanks!

I would suggest that you connect both the Web Parts. Make Web Part 1 the producer, and 2 the consumer.
Note that you do not really need to pass anything from one to another (You may pass the ID of record inserted), but just the producer-consumer connection would ensure that your second web part is refreshed once the first web part inserts any data into the database.