Server Button in Grid View with 2 parameters

  • Thread starter Thread starter mik
  • Start date Start date
M

mik

I've a grid view with a Server Button, I know how to send a single
value of the row, but How Can I manage 2 parameters (of the row)??

</asp:BoundField>
<asp:TemplateField HeaderText="Scadute">
<ItemTemplate>

<asp:Button ID="btnOggi" runat="Server" CommandArgument='<%#
Eval("ID") %>' OnClick="gwDettaglio_Click" Text='<%# Eval("ID") %>'
Width="60px" />
....


protected void gwDettaglio_Click(object sender, EventArgs e)
{
string IDAttivitaTipo;
IDAttivitaTipo =
Convert.ToString(((Button)sender).CommandArgument);




How Can I manage 2 differents variables in my code behind page?


Thanks
 
protected void gwDettaglio_Command(object sender, CommandEventArgs e)
{
Whatever = e.CommandName;
IDAttivitaTipo = e.CommandArgument;
}


Greeeeat!! Thanks for help me!!!!
 
Back
Top