I want to add the search box web part and search result web part programmatically using OM in Visual Studio. I searched over internet and found this which indicates to manually create web part and export it. Then copy the
<webpart> tag to string variable and add it to site.
Is there another way to add these webparts using objects? I even don't know from where to start? as I am very beginner to SharePoint.
If there any then please provide any reference or suggestions.