Link to home
Start Free TrialLog in
Avatar of attipa
attipaFlag for United States of America

asked on

open a new window with a dynamic url

hello,

someone please help me asap.  i need to finish this project.  i am making a datalist where it brings in a bunch of images which are then clickable. when an image is clicked, i want a new small window to open with the bigger image.  i want the link to dynamically carry the id of the row where the image is stored.  for example:

ID: 12
SmallImage: abc.jpg
BigImage: abc_big.jpg

when abc.jpg is clicked, it opens "press_detail.aspx?ID=12".  press_detail.aspx is a web form where it displays the big image and some additional information.  i know that the following code is for html:

<A onclick="MyWindow=window.open('Press/LV-0405.aspx','MyWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=600,height=650,left=10,top=10'); return false;" href="#">

How can I do this dynamically behind the code just as the following:

aspx file
---------------------
<asp:ImageButton ID="EnlargedPressImage" Runat="server"></asp:ImageButton>

aspx.vb file
----------------------
???????????
WHAT DO I DO HERE?


Some, please guide me in the right direction.  maybe im even going to complete wrong way.

thanks a million.
SOLUTION
Avatar of raterus
raterus
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of attipa

ASKER

ok...that is a lot of info...thanks...however one more question.

when you say.....


myPicture.Attributes.add("onclick", "window.open(...)")  

window.open('Press/LV-0405.aspx'.......) is the example i have up there.  how can i make it dynamic so i get the following......

window.open('Press/press_detail.aspx?ID='........)  <---- HOW CAN I ADD THE ID NUMBER DYNAMICALLY HERE?????  PLEASE WRITE OUT THE FULL CODE FOR THIS...I REALLY APPRECIATE IT.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial