WebClientPrint Sample Website Demo
The sample website demos that are installed with the WebClientPrint package are available for traditional ASP.NET Web Forms as well as for ASP.NET MVC. The sample website features a page for detecting if the WCPP utility is installed at the client machine and another page which presents to the user a wizard-like form asking him/her to specify what printer to use and the commands they want to send/print to the printer.
Sample Project Files
The sample websites are located in the installation folder of WebClientPrint under the Samples subfolder. Open the projects by using your favorite dev tool like Visual Studio or Visual Web Developer Express (VWD).
The sample websites are located in the installation folder of WebClientPrint under the Samples subfolder. Open the projects by using your favorite dev tool like Visual Studio or Visual Web Developer Express (VWD).
WebClientPrint Sample for ASP.NET Web Forms
The sample project for ASP.NET WebForms is structured as follows:
- Default.aspx
This page is used for detecting if the client/user has the WCPP utility installed. If WCPP is detected, then the user is redirected to the Sample.aspx page; otherwise the user is asked to install it. - Sample.aspx
This would be the main page which uses the WebClientPrint server component. It features a wizard which allows users to specify what type of “local” client printer they want to use as well as to enter the printer commands they want to send. The following figures are the three steps of the wizard:
WebClientPrint Sample for ASP.NET MVC
The sample project for ASP.NET MVC (including the Razor version) is based on the default template that Visual Studio or VWD creates. In the MVC project you will find the following files:
- Views/Home/index.aspx (MVC2) or Views/Home/index.cshtml (MVC3 or greater)
This page is used for detecting if the client/user has the WCPP utility installed. If WCPP is detected, then the user is redirected to the Sample page; otherwise the user is asked to install it. - Views/Sample/index.aspx (MVC2) or Views/Sample/index.cshtml (MVC3 or greater)
This would be the main page featuring a wizard which allows users to specify what type of “local” client printer they want to use as well as to enter the printer commands they want to send. - Controllers/SampleController.cs
The SampleController class is the one which uses the WebClientPrint server component to generate the WebClientPrint jobs based on the info specified by the user in the Sample view wizard.
The following figures show the three steps of the wizard: