Link to home
Start Free TrialLog in
Avatar of lynnadams
lynnadams

asked on

Event Controls not returning on a Visual Studio 20003 VB DATAGRID

I currently have an application that consists of two databases. A Header database and a detail database.

I set up an initial ASPX page to display a DATAGRID with 5 or 6 key fields form the 40 available fields on the Header Database. I also included a SELECT button.
In the code I added a ItemCommand event to redirect to another ASPX page when a row was selected. This piece work fine.

On the second ASPX page I display all 40 fields from the header table. Ten I added another DATAGRID to display data from the detail database associated with the selected header record.

I added the same ItemCommand logic as the first page but it does not work in this case. When I hit the selectbutton, the page just refreshes instead of redirecting to the third specified ASPX page.

any thaughts?

Private Sub DataGrid1_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles DataGrid1.ItemCommand
        Response.Redirect("SyllogyTranClaim.aspx")
End Sub
Avatar of dharmesh_amity
dharmesh_amity

Check SelectButton's CommandName and CommandArgument properties. Did you set those?
ASKER CERTIFIED SOLUTION
Avatar of dharmesh_amity
dharmesh_amity

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of lynnadams

ASKER

The Command Name is set to "Select"
If I change the button type from a pushbutton to a link button it works fine????