Last post Sep 05, 2012 04:56 AM by Rajesh Sawant
Sep 05, 2012 04:04 AM|Gaving30|LINK
Good morning, I am trying to pass an image from one page to another and having some difficulty. The page its is on is called Spain.aspx, it show Spanish football jerseys, it has a images in a gridview, i want users to be able to click on this any jersey
and get redirected to a page called ProductLarge where it will display the jersey they clicked and show it on a much larger scale. I have read around and tried some different methods but the closet i seem to be is with the below code:
<asp:Image ID="productimage" runat="server" ImageUrl='<%# "~/Handler.ashx?productid=" + Eval("productid")%>' Width="100" Height="100" />
<asp:HyperLink Font-Size="12px" ID="lnkImage" runat="server" ImageUrl='<%# "~/Handler.ashx?productid=" + Eval("productid")%>' NavigateUrl='<%#"ProductLarge.aspx?productid=" + Eval("productid")%>'> <a href ="ProductLarge.aspx" > </a> </asp:HyperLink>
Would anyone have advice, being new to this should i use a Handler(in your opinion), or be trying to use alternative methods for passing an image? Any help appreciated,
Sep 05, 2012 04:50 AM|Mudasir.Khan|LINK
you may use onclick event and then redirect using JS window.location by passing the parameter needed for the page and you may get image url by using innerElement tag
Sep 05, 2012 04:56 AM|Rajesh Sawant|LINK
You can check the feature of .net 2005, Cross page postback.
Using this you get the image from your previous page.
if (Page.PreviousPage != null)
TextBox SourceTextBox =
if (SourceTextBox != null)
Label1.Text = SourceTextBox.Text;
Please refer the below link for reference :-
Hope this will solve your problem.