ImageGear for .NET
Creating a Page Using the Project Item Template
Send Feedback
ImageGear for .NET User Guide > Getting Started > ImageGear for .NET Visual Studio 2010 Tutorials > ImageGear for .NET ASP.NET Tutorial > Creating a Page Using the Project Item Template

Glossary Item Box

  1. Right-click on the web site in the Visual Studio Solution Explorer and choose Add New Item to add a new page to your web site, based on the ThumbnailVerticalTemplate template.




  2. Drag an ImageGearBackEnd control from the Toolbox and drop it on the page. In Visual Studio's Source View, drop it just below the usage instructions; in Design View, drop it anywhere on the page. Adding ImageGearBackEnd to your form caused Visual Studio to copy the necessary ImageGear DLLs into the bin folder of your web site.

  1. Switch to Visual Studio's Design View for ThumbnailSampleVertical.aspx. You most likely will see the following problem because ImageGearBackEnd does not install the ImageGear21.Web.dll into the project:

  2. Normally in design mode, a PageView, ImGearThumbnailList or ThumbnailView control would be dragged from the Toolbox onto the Web design form by the developer, which would have installed the ImageGear21.Web.dll into the bin directory. The ThumbnailSampleVertical template is unable to perform this process automatically, so the next step is required to resolve the above error for this tutorial.
  3. Select the PageView control from the ToolBox and drop it onto the top left side of the design form. Now, switch to split view in the Visual Studio window, keeping the PageView control highlighted.



    The following line should be highlighted in the source window somewhere near the top of the ThumbnailVertical.aspx page:
ASP.NET Copy Code
<imgear:PageView ID="PageView1" runat="server" />
  1. Delete the highlighted line, as this is an extra unnecessary control for this tutorial demo page. The ImageGear21.Web.dll and the ImageGear21.Web.ImageDataProcessor.dll should now have been added to the Bin folder in your solution project. You should still see a PageView control, but sometimes the pre-installed PageView control will not be displayed properly unless the ThumbnailSampleVertical.aspx file is closed and then reopened.
  2. The control may indicate that the image handler settings in web.config are not set; the next step of this tutorial will help you set up web.config. Switch back to Visual Studio's Design View (on the ThumbnailSampleVertical.aspx file page).


  3. Configure the web.config file using the PageView control's action list.
    1. First, select the PageView control.
    2. Then open the action list menu by clicking on the arrow on the top-right corner of the control.
    3. Click on the following items to add the necessary configuration settings to web.config:
      • Configure ImageGear Web Settings - This launches a separate web.config editor which sets up the necessary configuration sections in that file. Please refer to the WebConfigEditor help section for more details. Typically entering and pressing Next to get to the save menu and selecting Save is sufficient for a default configuration. However for this tutorial, try adding two file data providers called FileImageDataProvider1 and FileImageDataProvider2. Have them tie to viewImages and viewerImages2 storage directories. Or simply copy the web.config file from the installed Accusoft samples folder: .\Samples\ASP.NET\CSharp\ASP.NET Tutorial\ASP.NET Tutorial. The folder can be found by clicking on the samples folder that is under the Accusoft folder off the Windows Start icon under All Programs.
      • Configure ImageGear ASP.NET Services - This creates the required ImageGearService.svc file necessary to run the ImageGear Services to support the website being constructed in this tutorial.
         
  4. Save your changes, and then run the application by selecting the ThumbnailSampleVertical.aspx in the Visual Studio Solution Window and right-clicking on it and choosing Set As Start Page. Then hit F5 to run the project or start the project from the Debug menu. Please note that if you installed only the 64-bit version of ImageGear, you cannot view your web site using Visual Studio; you will have to deploy it to IIS instead.

Use IISExpress from Microsoft for a better debugging experience with web services.

©2013. Accusoft Corporation. All Rights Reserved.