Click here to Skip to main content
15,891,621 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi im use The following code for get value datagrid

but each time only show one record
Previous

Click on a gridview btn when we have not add new record my previous shows

XML
<asp:ImageButton ID="IBaddbasket" runat="server" Height="33px"
                               text=""
                              CommandArgument= '<%# Eval("id") + "," + Eval("FTitleEn") + "," + Eval("FTitleFa") %>'
                              ImageUrl="~/pic/addbasket.jpg"  CausesValidation="false"    '> onclick="IBaddbasket_Click" />


C#
protected void IBaddbasket_Click(object sender, ImageClickEventArgs e)
    {
          ArrayList items = (ArrayList)Session["mycart"];
        CShoppingCartItem item = new CShoppingCartItem();
        ImageButton btn = (ImageButton)sender;
        string[] CommandArgument = btn.CommandArgument.Split(',');
        idbookbuy = Convert.ToInt32(CommandArgument[0]);
        txtnamee = CommandArgument[1];
        txtName = CommandArgument[2];
}
Posted
Updated 28-Apr-12 0:33am
v2

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