GridView ButtonField to a New Window
I'm currently using a RESPONSE.REDIRECT but I want to open to a new window using VB.NET. Any tips on doing this? TIA
Code:
Protected Sub gridREPORTS_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles gridREPORTS.RowCommand
If e.CommandName = "View" Then
Dim row As GridViewRow = gridREPORTS.Rows(Convert.ToInt32(e.CommandArgument))
Session("Reports") = row.Cells(0).Text
Response.Redirect("DisplayReport.aspx")
End If
End Sub
Re: GridView ButtonField to a New Window
Re: GridView ButtonField to a New Window
Quote:
Originally Posted by
benmartin101
Thanks - I'll look into it.
Re: GridView ButtonField to a New Window
Quote:
Originally Posted by
benmartin101
This is the approach that I have used in the past as well.
Depending on the layout of your code, and "what" you are doing during the postback to causes the redirect to another window, you might want to think about offloading this work on the client, and using something like jQuery/JavaScript to open the new window.
Gary
P.S. If your question has been answered, can you remember to mark your thread as resolved?