Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > Image to load in larger popup

Reply
Thread Tools

Image to load in larger popup

 
 
csgraham74
Guest
Posts: n/a
 
      05-22-2005
Hi guys,

just wondering if anyone can help me. I have a datagrid control that
pulls images into a template column using the following code

<asp:TemplateColumn HeaderText="Image">
<ItemTemplate>
<asp:image ImageUrl='<%# FormatURL(DataBinder.Eval(Container.DataItem,
"product_image")) %>' Width="90" Height="70" Runat=server ID="Image1"/>
</ItemTemplate>
</asp:TemplateColumn>

FormatURL - sets the path of the image.
I need to create some code that allows me to open a popup window when i
click on the image and to display a larger version of the image.

Im not sure how to go about this ??? any help or ideas appreciated.

thanks in advance

C

 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      05-23-2005
Add a client side onclick event for the image (c# syntax):

Image1.Attributes["onclick"]="showModalDialog('zoom.aspx?url='+this.src,'', '
');

zoom.aspx is a web form you need to make to get the enlarged image by
supplied url parameter.

Eliyahu

"csgraham74" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Hi guys,
>
> just wondering if anyone can help me. I have a datagrid control that
> pulls images into a template column using the following code
>
> <asp:TemplateColumn HeaderText="Image">
> <ItemTemplate>
> <asp:image ImageUrl='<%# FormatURL(DataBinder.Eval(Container.DataItem,
> "product_image")) %>' Width="90" Height="70" Runat=server ID="Image1"/>
> </ItemTemplate>
> </asp:TemplateColumn>
>
> FormatURL - sets the path of the image.
> I need to create some code that allows me to open a popup window when i
> click on the image and to display a larger version of the image.
>
> Im not sure how to go about this ??? any help or ideas appreciated.
>
> thanks in advance
>
> C
>



 
Reply With Quote
 
 
 
 
csgraham74
Guest
Posts: n/a
 
      05-23-2005
thanks for your help but are you sure this will work when my image is
in the datagrid ?????

i thought this would only work if my image was on the form.

thanks again

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
next / previous image swap WITH larger image popup Clay Javascript 1 09-28-2006 09:07 PM
Question: Can I make textarea larger (larger text)? Peter Williams HTML 1 06-03-2005 08:17 AM
20" LCD: setting 4 g Larger text in all Programs? and larger icons lbbss Computer Support 6 04-14-2005 05:46 PM
b&w digital for larger image??? Beowulf Digital Photography 6 07-29-2004 03:17 PM
Main > Popup > Popup > Close popup AND new URL in main? Jens Peter Hansen Javascript 7 06-19-2004 08:56 PM



Advertisments