使用GridView中的删除功能后,怎么让页面自动转到指定页面?
如题,我在使用GridView的删除功能后,删除掉指定内容了,页面就停在那里,我想让它删除成功后返回指的页面,怎么实现? <ItemTemplate>
<asp:LinkButton ID= "LinkButton1 " runat= "server " CommandName= "Delete " OnClientClick= "return confirm( '确定删除此订单吗? '); "> 删除此订单 </asp:LinkButton>
</ItemTemplate>
------解决方案--------------------服务器事件里
删除完毕
Response.Redirect( "xx.aspx ")
------解决方案--------------------msdn例子
Sub CustomersGridView_RowDeleted(sender As Object, e As GridViewDeletedEventArgs)
' Display whether the delete operation succeeded.
If e.Exception Is Nothing Then
response.redirect( " ")
Else
Message.Text = "An error occurred while attempting to delete the row. "
e.ExceptionHandled = True
End If
End Sub