Redirect Temp Path of Barcode Control

< Back
You are here:
Print

Redirect Temp Path of Barcode Control

By default, the server control expects the page to be in the virtual directory on the server with a subdirectory of IDAutomation, which is where the images are stored. While possible, overriding this feature is a bit tricky because of how the underlying .NET classes work, but only three properties of the server control need to be changed. Below are the steps:

  1. Set the AllowCustomPaths property to true. This tells the control to override the default settings.
  2. Change the ImageLocalPath to the absolute path of the location where the images are to be saved. This must be a subdirectory of the virtual directory for security reasons. This tells the control specifically where to save the images it creates. For example, this value would be C:\inetpub\wwwroot\WebApplication1\MyBarcodeImages.
  3. Change the ImageRelativePath to the relative path of the virtual directory where the images are stored. This effectively is the source of the image tag in the html that is rendered by the control. For example, this value would be \MyBarcodeImages.