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(ByVa l source As Object, ByVal e As System.Web.UI.WebControls. DataGridCo mmandEvent Args) Handles DataGrid1.ItemCommand
Response.Redirect("Syllogy TranClaim. aspx")
End Sub
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(ByVa
Response.Redirect("Syllogy
End Sub
Check SelectButton's CommandName and CommandArgument properties. Did you set those?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The Command Name is set to "Select"
ASKER
If I change the button type from a pushbutton to a link button it works fine????