Link to home
Start Free TrialLog in
Avatar of Ed
EdFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Muliple Select Buttons in Gridview row

Hi

I have a gridview with a select button in it.

When the button is selected it sets the value of one of the cells in a session which all works fine.

What I want to do is add another select button which sets a different cell value to a session when clicked.

The problem is I already have 1  selectedindexchange event.

I'd like another one that sets a value in a session from a different row cell. Cant work it out


Protected Sub GridView2_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles GridView2.SelectedIndexChanged
        Dim row As GridViewRow = GridView2.SelectedRow


        Session("CanvassID") = row.Cells(0).Text
        Response.Redirect("ViewNoteDetail.aspx")

    End Sub

Open in new window

Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Why not set both values in above event?
Avatar of Ed

ASKER

CodeCruiser

Thanks but the reason for not setting both values in the above event is that I want the second button to set a value and then redirect to a different page.
ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

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