For print command on asp Button
<script type="text/javascript">
function CallPrint()
{
var prtContent = document.getElementById("divPrint");
// window.document.write(prtContent.innerHTML);
window.document.close(); window.focus();
window.print(); window.close();
}
function SetPrintSettings()
{
// -- advanced features
factory.printing.SetMarginMeasure(2)
// measure margins in inches
factory.SetPageRange(false, 1, 3)
// need pages from 1 to 3
factory.printing.printer = "Default"
factory.printing.copies = 2
factory.printing.collate = true
factory.printing.paperSize = "A4"
factory.printing.paperSource = "Manual feed"
// -- basic features
factory.printing.header = "" factory.printing.footer = ""
factory.printing.portrait = false
factory.printing.leftMargin =0.25
factory.printing.topMargin = 0.25
factory.printing.rightMargin = 0.25
factory.printing.bottomMargin = 0.25
}
</script>
Call a function on Button
<asp:Button ID="Button1" runat="server" Text="Print" OnClientClick="CallPrint()"/>
JavaScript
| Qts: | Converting Upper Case to Lower Case JavaScript |
| Ans: | var str="This is my 1st new Tuorial 123"; |
| var a2 = str.toLowerCase(); | |
| document.write(a2); | |
| Qts: | Converting
This website was built using N.nu - try it yourself for free.
|

