Server Button in Grid View with 2 parameters

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
 
M

mik

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


Greeeeat!! Thanks for help me!!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top