Friday, December 16, 2016

How to Print in ASP.NET using JavaScript

ASP.NET Code: 

<asp:Panel ID="pnlContents" runat="server">
     Here will go your Code
</asp:Panel>
<asp:Button ID="btnPrint" runat="server" Text="Print" 
OnClientClick = "return PrintPanel();" />


JavaScript Code:

<script type = "text/javascript">
        function PrintPanel() {
            var panel = document.getElementById("<%=pnlContents.ClientID %>");
            var printWindow = window.open('', '', 'height=400,width=800');
            printWindow.document.write('<html><head><title>Print Page Header</title>');
            printWindow.document.write('</head><body >');
            printWindow.document.write(panel.innerHTML);
            printWindow.document.write('</body></html>');
            printWindow.document.close();
            setTimeout(function () {
                printWindow.print();
            }, 500);
            return false;
        }
    </script>

pnlContents is the ID of ASP.NET Panel Element It. Which we Want to print. Just replace this Id name with yo

Friday, October 14, 2016

How to Check IIS is installed or not

Lets Check IIS is installed or not

Step-1: Go to run option. shortcut is windows key + r and Write inetmgr and hit ok button.



This IIS Manager Window is coming. if not than IIS is not install on your computer. 


Another way is type localhost in your browser address bar than this type of page will come

  


Thursday, October 13, 2016

How to install Microsoft SQL server 2012

Today will learn how to install Microsoft SQL server 2012 on windows 10. but it will be work for all windows OS.  So lets start

Step 1: First go to Google.com and search for ms sql server 2012 download. you can also search as your know. click the relevant link for me it was 1st.



Step 2:  The following tab will be open click the download button.



Step 3: Download the following files


If all thing goes well you will get this message 


Step 3: Then go to your download folder select the bellow file. and double click it.