ImageGear for .NET
Creating a Page Using the Project Item Template
  1. Right-click on the web site in the Visual Studio Solution Explorer and choose Add > Add New Item.

  2. In Template dialog, select ThumbnailVerticalTemplate template to add a new page to your web site.

  3. Add a reference to ImageGear21.Web.Services.dll.
    1. Right-click on Bin and choose Add Reference…
    2. Navigate to ImageGear.NET v21\Bin in the folder into which you installed ImageGear for .NET.
    3. Add ImageGear21.Web.Services.dll to the project.
  4. 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.
  5. 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:

  6. 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.
  7. 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:

     
    Copy Code
    <imgear:PageView ID="PageView1" runat="server" />
       
  8. 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 viewerImages 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 navigating to Start > All Programs > Accusoft and clicking on the Samples folder.
      • 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.

  9. 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 by selecting the View in Browser (Internet Explorer) menu item.

 

 


©2014. Accusoft Corporation. All Rights Reserved.

Send Feedback