Event Controls not returning on a Visual Studio 20003 VB DATAGRID

Posted on 2005-04-19
Last Modified: 2013-11-26
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
End Sub
Question by:lynnadams
    LVL 6

    Expert Comment

    Check SelectButton's CommandName and CommandArgument properties. Did you set those?
    LVL 6

    Accepted Solution

    Atleast set CommandName

    Author Comment

    The Command Name is set to "Select"

    Author Comment

    If I change the button type from a pushbutton to a link button it works fine????

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
    This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now