searchsanjaysharma
asked on
How to trap click event on repeater row.
I have these 2 codes in two pages.
a.aspx
<asp:Repeater ID="repeatimages" runat="server" >
<HeaderTemplate>
<table border="1" width="100%">
<tr>
<th>Product Id</th>
<th>Name</th>
<th>Image</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td><asp:Label ID="lbl" runat="server" Text='<%#Eval("pid") %>'></asp:Label> </td>
<td><%#Eval("pname")%> </td>
<td>
<img src="images/<%# Eval("imagepath") %>" alt="" />
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
b.aspx
<asp:Repeater ID="repeatimages" runat="server" >
<HeaderTemplate>
<table border="1" width="100%">
<tr>
<th>FabricID</th>
<th>Name</th>
<th>Image</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td><asp:Label ID="lbl" runat="server" Text='<%#Eval("fid") %>'></asp:Label> </td>
<td><%#Eval("fname")%> </td>
<td>
<img src="images/<%# Eval("imagepath") %>" alt="" />
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
I want to achieve 3 tasks.
1. How to pick the details of the row in repeater where user click the image from a.aspx
2. It control should move to b.aspx.
3. How to pick the details of the row in repeater where user click the image from b.aspx
4.The click should move to c.aspx where
<img id="p1" src=""> //Image from a.aspx should come.
<img id="f1" src=""> //Image from b.aspx should come.
a.aspx
<asp:Repeater ID="repeatimages" runat="server" >
<HeaderTemplate>
<table border="1" width="100%">
<tr>
<th>Product Id</th>
<th>Name</th>
<th>Image</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td><asp:Label ID="lbl" runat="server" Text='<%#Eval("pid") %>'></asp:Label> </td>
<td><%#Eval("pname")%> </td>
<td>
<img src="images/<%# Eval("imagepath") %>" alt="" />
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
b.aspx
<asp:Repeater ID="repeatimages" runat="server" >
<HeaderTemplate>
<table border="1" width="100%">
<tr>
<th>FabricID</th>
<th>Name</th>
<th>Image</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td><asp:Label ID="lbl" runat="server" Text='<%#Eval("fid") %>'></asp:Label> </td>
<td><%#Eval("fname")%> </td>
<td>
<img src="images/<%# Eval("imagepath") %>" alt="" />
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
I want to achieve 3 tasks.
1. How to pick the details of the row in repeater where user click the image from a.aspx
2. It control should move to b.aspx.
3. How to pick the details of the row in repeater where user click the image from b.aspx
4.The click should move to c.aspx where
<img id="p1" src=""> //Image from a.aspx should come.
<img id="f1" src=""> //Image from b.aspx should come.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER