How do I bind the data from the database to the .aspx web form which acts as a
template(with tables, textboxes, labels etc) and this is a common template for
rendering a number of documents having different data from database.
The template should be rendered with the data when user selects a document from a
list of documents on the website.
Create an XSL template, which has the table, textboxes etc. Then in the code-behind you can bind the data from database to that template. You can use for-each, if, case statements in the XSL to show/hide elements based on data.