In addition to loading a document from file (see the ASP.NET Application tutorial), a document can be loaded from a database.
%DATABASE_NAME%
to your database name.
Copy Code | |
---|---|
<connectionStrings> <add name="SqlImageProviderConnection" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\%DATABASE_NAME%;Integrated Security=True;User Instance=True" /> </connectionStrings> |
Copy Code | |
---|---|
<add name="SqlImageDataProvider" type="ImageGear.Web.DataProviders.SqlImageDataProvider,ImageGear24.Web.Services" connectionStringName="SqlImageProviderConnection" sqlCommand="SELECT ImageData FROM dbo.ImageStore WHERE [Image_key] = @Image_key" sqlCommandType="Text" sqlImageDataField="ImageData" sqlParameter="@Image_key" paramKeySqlDbType="UniqueIdentifier" paramKeyLength="36" cachingEnable="false" sqlCacheDependencyNeeded="false" initSqlCacheDependency="false" maxImageSizeToCache="512" cachingTimeLimit="5" sqlArtReadCommand="SELECT Annotations FROM dbo.ImageStore WHERE [Image_key] = @Image_key" sqlArtReadCommandType="Text" sqlArtUpdateCommand="UPDATE dbo.ImageStore SET Annotations = @Annotations WHERE [Image_key] = @Image_key" sqlArtUpdateCommandType="Text" sqlArtDataField="Annotations" sqlArtParameter="@Annotations" /> |
Copy Code | |
---|---|
_ctrlView.openPage({ documentIdentifier: 'SqlImageDataProvider:6b29f53a-1e1b-446b-9b3b-9d234452f3e2', pageNumber: 1, viewFitType: ImageGear.Web.UI.FitType.ActualSize }); |