加载放大产品图片 [英] Loading Zoom Product Image

查看:70
本文介绍了加载放大产品图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



请帮我,我显示数据库中的产品图片,但仅静态图片不支持缩放图片.这是我的编码路径.

还有一件事,如果我给出直接图像意味着可以缩放图像,但是我从数据库中调用的图像将被显示,但是缩放不起作用.请参考我的编码路径并给出正确的解决方案.

.aspx:

Hi,

Please help me I show the product image from database but zooming image does not supported for static only. This''s my coding path.

And one thing If I give direct image means zooming image will be work, but I called from database image will be display but zooming does not work. Please refer my coding path and give right solution.

.aspx:

<a href="<%# FormatImg(DataBinder.Eval(Container.DataItem,"image1")) %>" rel="drag-mode:true; zoom-height:270px; zoom-width:350px; x:140; y:140" class="MagicZoom"><img src='<%# FormatImg(DataBinder.Eval(Container.DataItem,"image1")) %>' id="imgSmile"  runat="server" style="width:100px; height:110px;" /></a>



代码隐藏页:



code-behind page:

imgSmile.Src = FormatImg(ds.Tables[20].Rows[0]["image1"].ToString());

public string FormatImg(object str)
 {
     string strArg = "~/pro_images/" + str.ToString();
     return strArg;
 }



Bala


By
Bala

推荐答案



请帮我,我显示数据库中的产品图片,但仅静态图片不支持缩放图片.这是我的编码路径.

还有一件事,如果我给出直接图像意味着可以缩放图像,但是我从数据库中调用的图像将被显示,但是缩放不起作用.请参考我的编码路径并给出正确的解决方案.

.aspx:
收合|复制代码

< img src =<%#FormatImg(DataBinder.Eval(Container.DataItem," image1))%>" id ="imgSmile" runat ="server" style ="width:100px ; height:110px;"/>


代码隐藏页:
收合|复制代码

Hi,

Please help me I show the product image from database but zooming image does not supported for static only. This''s my coding path.

And one thing If I give direct image means zooming image will be work, but I called from database image will be display but zooming does not work. Please refer my coding path and give right solution.

.aspx:
Collapse | Copy Code

<img src="<%# FormatImg(DataBinder.Eval(Container.DataItem,"image1")) %>" id="imgSmile" runat="server" style="width:100px; height:110px;" />


code-behind page:
Collapse | Copy Code

imgSmile.Src = FormatImg(ds.Tables[20].Rows[0]["image1"].ToString());
 
public string FormatImg(object str)
 {
     string strArg = "~/pro_images/" + str.ToString();
     return strArg;
 }




巴拉



By
Bala


这篇关于加载放大产品图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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