I have a page where I need to click on links on right hand side and left hand side, and display modal dialogs. I am seeing on bootstrap\'s site that the code for each modal
That depends on how you want to load your dialogs' content.
If you want them inline, yes, you have to put all the html in the main page. So when user click the link, the content is already there and can be rendered immediately.
If you want them loaded only when someone clicked the link, you can use iframe inside the modal, or use ajax to load the partial content. check remote section in the modal documentation.
Or, if you want inline modal but your modals have slightly different content, you can check this http://getbootstrap.com/javascript/#modals-related-target