Groups | Blog | Home
all groups > asp.net webcontrols > november 2003 >

asp.net webcontrols : select button in datagrid to cause a redirect



TJS
11/21/2003 1:34:23 PM
I have a select button in a datagrid which I want to cause a redirect when
clicked

I have this in script
===============================
Sub Page_Load(Sender As Object, E As EventArgs)
If Not Page.IsPostBack Then
' Databind the data grid on the first request only
BindGrid()
End If
End Sub

Sub DataGrid_ItemCommand(Sender As Object, E As
DataGridCommandEventArgs)
' display a new report
If e.commandName="Select" then
response.redirect("reports.aspx?ID=" & e.item.itemindex)
End if
End Sub
================================

<asp:ButtonColumn Text="Select" ButtonType="PushButton" HeaderText="Get
Report" CommandName="Select"></asp:ButtonColumn>

but redirect does not get activated on button push
what's missing ?????????


TJS
11/21/2003 11:45:12 PM
problem found

[quoted text, click to view]

AddThis Social Bookmark Button