Click here to Skip to main content
15,917,617 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a DataList view with ImageButton, can you suggest me for How to use Response.Redirect("ProductDetails.aspx") on click of ImageButton.
Posted
Comments
Nelek 22-Dec-13 9:10am    
What do you want to do?
JoCodes 22-Dec-13 11:53am    
Where is your code and whats the issue faced?

Refer below link which deals with the same.
http://chikkanti.wordpress.com/2012/05/12/datalist-control-example-in-asp-net/[^]

If facing any specific issue , update your question with the same.
Hope this helps...
 
Share this answer
 
HI
Try this sample..

XML
<%@ Page Language="C#" EnableEventValidation="false" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs"
    Inherits="POC.WebForm2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>

</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="up" runat="server">
        <ContentTemplate>
            <asp:DataList ID="dl" runat="server">
                <ItemTemplate>
                    <asp:ImageButton ImageUrl="box.jpg" OnClick="btn_Click" runat="server" />
                </ItemTemplate>
            </asp:DataList>
        </ContentTemplate>
    </asp:UpdatePanel>
    </form>
</body>
</html>


code behind:

C#
protected void btn_Click(object sender, ImageClickEventArgs e)
        {
            Response.Redirect("ProductDetails.aspx");

        }
 
Share this answer
 

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