Click here to Skip to main content
16,019,876 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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:
ASP.NET
<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:
C#
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
Posted
Updated 2-Jul-12 0:46am
v3

1 solution

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

C#
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
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900