Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: ASP
Posted by: Mario Lopes
Added: Apr 6, 2018 4:02 PM
Views: 12
Botão comprar ou apagar numa gridview
  1. protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
  2.     {
  3.         if (e.CommandName != "Comprar") return;
  4.         int id = Convert.ToInt32(e.CommandArgument);
  5.         Response.Write(id);
  6.     }
  7. no aspx devemos colocar
  8. CommandName="Comprar" CommandArgument='<%# Eval("id") %>'