JSSOR使用ASP.NET动态影像 [英] JSSOR with ASP.NET dynamic image

查看:99
本文介绍了JSSOR使用ASP.NET动态影像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面是我的HTML code,我现在用搜索

 < D​​IV U =幻灯片>
      < D​​IV>
      < ASP:SqlDataSource的ID =1=服务器的ConnectionString =<%$的ConnectionStrings:构造%GT;的SelectCommand =选择映像从库>< / ASP:SqlDataSource的>
           < ASP:直放站ID =Repeater1=服务器的DataSourceID =1>
               <&ItemTemplate中GT;
                   < IMG U =形象SRC =<%#image.ashx n =+的eval(ID)?%GT; />
               < / ItemTemplate中>
        < / ASP:直放站>
        < / DIV>

在通用处理器.ashx的用于图像

我的问题是,在幻灯片上,只有最后一次上传的图片出来。
例如,如果我上传的5张图像,只有第五最后上传的图像上来就滑块与它保持不变。结果

我已经测试过相同的通用处理器。它的另一个滑块工作正常。
我失去了一些东西。


  

P.S - 在Jssor脚本和CSS都在它们的默认值。
  什么也没有修改。



解决方案

您放置所有图像一张幻灯片。
每一个形象,请在下面创建幻灯片。

 < D​​IV U =幻灯片>
    < ASP:SqlDataSource的ID =1=服务器的ConnectionString =<%$的ConnectionStrings:构造%GT;的SelectCommand =选择映像从库>< / ASP:SqlDataSource的>
           < ASP:直放站ID =Repeater1=服务器的DataSourceID =1>
               <&ItemTemplate中GT;
                   < D​​IV>
                       < IMG U =形象SRC =<%#image.ashx n =+的eval(ID)?%GT; />
                   < / DIV>
               < / ItemTemplate中>
           < / ASP:直放站>
    < / ASP:SqlDataSource的>
< / DIV>

Here is my HTML Code that i am using

<div u="slides">
      <div>
      <asp:SqlDataSource ID="1" runat="server" ConnectionString="<%$ ConnectionStrings:constr %>" SelectCommand="SELECT Image FROM Gallery"></asp:SqlDataSource>
           <asp:Repeater ID="Repeater1" runat="server" DataSourceID="1">
               <ItemTemplate>
                   <img u="image" src="<%# "image.ashx?Id="+ Eval("Id") %>" />
               </ItemTemplate>
        </asp:Repeater>
        </div>

The Generic Handler .ashx for the image is THIS
My Issue is that on the Slide, only the last image uploaded come out. For example, if i uploaded 5 images, only the fifth last uploaded image come up on the slider and it remains static.

I have tested the same generic Handler. it works normal for another slider. am i missing something.

P.S - the Jssor scripts and css are all in their default values. nothing was edited.

解决方案

You placed all images in a single slide. Please create slide for every image as below.

<div u="slides">
    <asp:SqlDataSource ID="1" runat="server" ConnectionString="<%$ ConnectionStrings:constr %>" SelectCommand="SELECT Image FROM Gallery"></asp:SqlDataSource>
           <asp:Repeater ID="Repeater1" runat="server" DataSourceID="1">
               <ItemTemplate>
                   <div>
                       <img u="image" src="<%# "image.ashx?Id="+ Eval("Id") %>" />
                   </div>
               </ItemTemplate>
           </asp:Repeater>
    </asp:SqlDataSource>
</div>

这篇关于JSSOR使用ASP.NET动态影像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆