show-notice
hide-notice

Friday 23 August 2013

Redirect to another page using image button in gridview


Introduction:

Here i will explain how to Redirect to another page using image button in gridview.

Description:

Most of the image button use for record edit, but that time not redirect page in the griedview. Now i will explain Redirect to another page using image button in gridview.

Example:

protected void imgbtnEdit_Click(object sender, ImageClickEventArgs e)
{
    ImageButton imgbtnEdit = (ImageButton)sender;
    GridViewRow gr = (GridViewRow)imgbtnEdit.NamingContainer;
    TextBox textInt = (TextBox)gr.FindControl("text1");
    if (textInt.Text == "Text")
    {
        Response.Redirect("Text.aspx");
    }
}

SHARE THIS POST   

0 comments :

Post a Comment

Design by Gohilinfotech | www.gohilinfotech.blogspot.com