Vikas Ahlawat

Vikas Ahlawat

  • NA
  • 564
  • 819.1k

How to pass gridview row data to next page?

Dec 2 2010 7:39 AM
I m using gridview (TemplateField) and in it i have bind data using Eval, i have taken a selectbutton on it , now i want to show this perticular row data in next page. how can i do that?

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" Width="700px">
   
        <Columns>
                 <asp:TemplateField>
                      <ItemTemplate>
<%--<table width="100%">
             
                <tr style="background:blue; color:white; font-weight:bold; " >
                     <td colspan="7">£ <%#Eval("TotalPrice") + " Total"%>
                    </td>
                
                </tr>
                <tr>
                    <td>
                        <%#Eval("Leg1DepDate")%>
                    </td>
                    <td>
                        <%#Eval("Leg1DepTime")%>
                    </td>
                    <td><%#Eval("tFrom")%>
                        </td>
                    <td>
                        </td>
                    <td>
                        &nbsp;</td>
                    <td><%#Eval("Leg1AvlCarrier")+""+ Eval("Leg1FltNo1")+" / "+Eval("Leg1FltNo2")%>
                        </td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td><%#Eval("Leg1ArrDate")%>
                        </td>
                    <td><%#Eval("Leg1ArrTime")%>
                        </td>
                    <td><%#Eval("tTo")%>
                    </td>
                    <td>
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                    <td>via <%#Eval("Leg1Via1")%>
                       </td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td>
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                    <td><%#Eval("AirlineName")%>
                        </td>
                    <td>
                        </td>
                    <td>
                        &nbsp;</td>
                    <td>Duration <%#Eval("Leg1ElaspedTime")%>
                        </td>
                    <td>
                        &nbsp;</td>
                </tr>
                  <tr>
                    <td>
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                    <td>
                        <asp:Image ID="Image1" runat="server" ImageUrl='<%# "~/images/AirlineLogo/" +Eval("AirlineLogo5045")%>' />
                        </td>
                    <td>
                        </td>
                    <td>
                        &nbsp;</td>
                    <td>
                        </td>
                    <td><asp:ImageButton ID="ImageButton2" runat="server" ImageUrl='<%# "~/images/AirlineLogo/" +Eval("AirlineLogo5045")%>'  />
                        &nbsp;</td>
                </tr>
                </table>--%>
    
             </ItemTemplate>
        </asp:TemplateField>
        </Columns>

    </asp:GridView>

Answers (3)