Finally I have added a asp button in a Div
placed the Div at required place
means just on the Dynamically created table(html).
and on button click
<script type="text/javascript">
function PrintContent() {
var DocumentContainer = document.getElementById('divPrint');
var WindowObject = window.open('', 'PrintWindow', 'width=750,height=650,top=50,left=50,toolbars=no,scrollbars=yes,status=no,resizable=yes');
var strHtml = "<html>\n<head>\n<link rel="\"stylesheet\"" type="\"text/css\"" href="\"print.css\"">\n</head><body>\n<div style="\"testStyle" documentcontainer.innerhtml="" mode="hold" /> WindowObject.document.writeln(strHtml);
WindowObject.document.close();
WindowObject.focus();
}
</link>
called this javasript Function
<asp:imagebutton id="ImageButton1" runat="server" xmlns:asp="#unknown">
ImageUrl="~/Images/print2.gif" OnClientClick="javascript:PrintContent('divPrint');" />
</asp:imagebutton>
divPrint is the Id of the Table/div (dynamic)
and Got it working.Interestingly now my page contains only one asp button.That is a Print Button.