click row in gridview
<p>hiiiiiiiii
I am trying to do the following :
I have a gridview and I want to fire a function(C# function) when I click over the row (any where)
this my code :</p>

<pre><code>protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{

    string alertBox = "alert('";
    if (e.Row.RowType == DataControlRowType.DataRow)
    {
        alertBox +=e.Row.Cells[0].Text;
        alertBox += "')";
        e.Row.Attributes.Add("onclick", alertBox);
    }
}
public void test()
{
    Response.Write("ffff");
}
</code></pre>

<p>this is working ..and every time I click over the gridview
I found  an alert ...but I want
to fire C# function(like test function in the code)
how to do that
thanks</p>
