To enable "Show Tool Bar" option in Document Web Part through Code

I am going to explain a scenario where I had an OOB Document Web Part in one of my page and from code i had to enable the “Show Tool Bar” for that Web Part. The scenario can be achieved through reflection. The code is given below. splist -> The Document Library List webpartID -> Id of the Document…

1