Information about ASP.NET, C#, VB.NET,JQuery, AJAX, SQL Server, Java script,.NET tips and tricks, LINQ, OOPS Concept, DotNet Interview Questions
Monday, May 25, 2009
How To Generate IFrame At Runtime Using Javascript
Thursday, May 14, 2009
How to Print Div Tag Using Javascript?
HTML FILE :
<script language="javascript">
function CallPrint( strid )
{
var prtContent = document.getElementById( strid );
var WinPrint = window.open('', '', 'left=0,top=0,width=900,height=600,toolbar=1,scrollbars=1,status=0');
WinPrint.document.write( prtContent.innerHTML );
WinPrint.document.close();
WinPrint.focus();
WinPrint.print();
WinPrint.close();
prtContent.innerHTML=strOldOne;
}
script>
<div id="print_Grid">
This is Print
This is Print
This is Print
This is Print
This is Print
div>
Code FILE :
protected void Page_Load(object sender, EventArgs e)
{
btnPrint.Attributes.Add("onclick", "javascript:CallPrint('print_Grid')");
}
How To Use This Code?
1. Copy JavaScript into your HTML Page
2. Make a Div Tag Which data you want to print into that div tag
3. Add Print Button and call JavaScript Function
Wednesday, May 13, 2009
How To Get List of Tables in SQL Server
How to Get SQL Table Columns List
How to get all field names in a table using sql query?
ShareThis
Welcome
Here you can find some useful code and information about asp.net., c#, VB.net, SQL Server, Web Service, Web Designing etc