Dear all,
aspx file
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" CellPadding="10" CellSpacing="1" OnRowDataBound="GridView1_RowDataBound" OnSelectedIndexChanged="GridView1_SelectedIndexChanged">
<Columns>
<asp:BoundField DataField="g_id" HeaderText="S.no" ReadOnly="True"/>
<asp:BoundField DataField="gcdate" HeaderText="Date" />
<asp:BoundField DataField="gc_no" HeaderText="G.c #" />
<asp:BoundField DataField="consignor_detail" HeaderText="Consignor" />
<asp:BoundField DataField="consignee_detail" HeaderText="Consignee" />
<asp:BoundField DataField="qty" HeaderText="Nos" />
<asp:BoundField DataField="package_type" HeaderText="Contains" />
<asp:BoundField DataField="total_amount" HeaderText="Amount" />
<asp:BoundField DataField="acc_type" HeaderText="Remark" />
<asp:BoundField DataField="loading_status" HeaderText="Status" />
<asp:CommandField ButtonType="Image" SelectImageUrl="images/icon1.gif" ShowSelectButton="True" />
<asp:CommandField ButtonType="Image" SelectImageUrl="images/icon2.gif" ShowSelectButton="True" />
</Columns>
</asp:GridView>
aspx.cs file
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
TextBox1.Text= GridView1.SelectedRow.Cells[0].Text;
Response.Redirect("View_Gcdetails.aspx?Id=" + TextBox1.Text);
}
i have 2 image button. when i click the image button1 it go view_gcdetails.aspx page and click the image button2 it go view_gcdetails2.aspx page any one solve the problem and code
regards
sathish