Carmen

Carmen

  • NA
  • 11
  • 0

GridView

Jun 5 2009 4:53 PM

I have my gridview's autogenerateeditbutton=true. I want to make it so when the user clicks on the edit button they will be redirected to a new page. I've been searching the msdn pages to find the code to redirect to a new page and I get this as an example:
<asp:Button
  ID="Button1"
  PostBackUrl="~/TargetPage.aspx"
  runat="server"
  Text="Submit" />
But It seems the only way to access the autogenerated edit button is through gridview's event:
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)

How do i redirect to a new page in the event code?
Thanks

Answers (1)