views:

15

answers:

0

A nice good afternoon from Germany,

I have a asp:GridView and ButtonFields on the row with a RowCommand event.

protected void gridView_RowCommand(object sender, GridViewCommandEventArgs e)
{
    switch (e.CommandName)
    {
        case "FirstButton":
            this.DoSomething();
            break;
        case "SecondButton":
            this.DoSomethingElse();
            break;
    }
    this.BindDataGrid();
}

My Problem is in over 90% of all cases when I cklick on a ButtonField this event get's raised twice. The Problem with this is after I execute the this.DoSomething() or this.DoSomethingElse() the specific Line can't get executed agan.

thx
Marc