Posts Tagged ‘print’

How to Print Datagrid in ASP.Net


To print only the content of the datagrid control, you need to encapsulate it with div element.

Example:

  1. <script type="text/javascript" language="javascript">// <![CDATA[
  2. function PrintDataGrid(elementname) {
  3. var oDiv = document.getElementById(elementname);
  4. var oprint_window = window.open('', '', 'letf=0,top=0,width=1,height=1,toolbar=0,scrollbars=0,status=0');
  5.  
  6. oprint_window.document.write(oDiv.innerHTML);
  7. oprint_window.document.close();
  8. oprint_window.focus();
  9. oprint_window.print();
  10. oprint_window.close();
  11. }
  12. // ]]></script>

or

  1. <input id="Button1" onclick="javascript:PrintDataGrid('DatagridData')" type="button" value="button" />

,

No Comments


How to Print ASCII characters in SQL Server (T-SQL)

Use char(intValue)

Param: intValue = Is an integer from 0 through 255. NULL is returned if the integer expression is not in this range.

Control character Value

Tab

char(9)

Line feed

char(10)

Carriage return

char(13)


, , , , ,

No Comments



SetPageWidth