Note that there are some explanatory texts on larger screens.

plurals
  1. POGalleria slideshow control: Loading gallery images from a varbinary database field to an ASP.NET page
    primarykey
    data
    text
    <p>I am trying to load from a SQL Server database the gallery images of the Galleria slideshow control <a href="http://galleria.io/" rel="nofollow noreferrer">http://galleria.io/</a>. I have placed my Galleria control in an ASPX page.</p> <p>I am trying the ListView solution recommended in an old post: <a href="https://stackoverflow.com/questions/6719236/using-galleria-jquery-plugin-with-an-asp-net-listview">Using Galleria jQuery plugin with an asp.net ListView</a> but it's not working. Does anyone know if it is indeed possible to load images to the Galleria control from a database? If so, what data type does the image field need to have? I tried both varbinary (the actual image) and also nvarchar (just the path of the image), none of those work. The page just hungs. </p> <p>Here is my ASPX code:</p> <pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeFile="Aircraftpedia_GalleriaDB.aspx.cs" Inherits="Library_Aircraftpedia_GalleriaDB" %&gt; &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head runat="server"&gt; &lt;title&gt;&lt;/title&gt; &lt;script type="text/javascript" src="../_js/slider_jQueryUI/jquery-1.6.2.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="../_js/galleria/galleria-1.2.7.min.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;asp:SqlDataSource ID="dsSelectAllAircraftpedia" runat="server" ConnectionString="&lt;%$ ConnectionStrings:MYDB%&gt;" SelectCommand="cda_Aircraftpedia_SelectAll" SelectCommandType="StoredProcedure" ProviderName="&lt;%$ ConnectionStrings:MYDB.ProviderName %&gt;"&gt;&lt;/asp:SqlDataSource&gt; &lt;asp:ListView runat="server" ID="lvw"&gt; &lt;LayoutTemplate&gt; &lt;div id="gallery"&gt; &lt;asp:PlaceHolder ID="itemPlaceholder" runat="server"&gt;&lt;/asp:PlaceHolder&gt; &lt;/div&gt; &lt;/LayoutTemplate&gt; &lt;ItemTemplate&gt; &lt;img id="photoAlbumPhotos" src='&lt;%# Eval("AcImage") %&gt;' alt="Image Not Found" class="photoAlbumPhotos" /&gt; &lt;/ItemTemplate&gt; &lt;/asp:ListView&gt; &lt;script type="text/javascript"&gt; $(document).ready(function () { Galleria.loadTheme('../_js/galleria/themes/classic/galleria.classic.min.js'); $("#gallery").galleria({ width: 700, height: 500 }); }); &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>And my C# code:</p> <pre><code>protected void Page_Load(object sender, EventArgs e) { this.lvw.DataSource = this.dsSelectAllAircraftpedia; this.lvw.DataBind(); } </code></pre> <p>Please let me know if you have any ideas on how to make this code work or if you have another solution to recommend.</p> <p>Thank you.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload