Gridview, links and passing a value

CaJack's Avatar
Go4Expert Member
Iím having trouble finding a way to pass a value from a gridview link item to the next page. If a user searches for a CD say queen and clicks submit all the CDs with the name queen are shown with there unique numbers and dates added. If the user clicks on one of the CD IDís it takes them to a page called cdview, the cd id will be used to retrieve all the information about the cd. Hereís an exampleÖ

Search CD = Queen (clicked submit)

CD ID__________CD Name________Date

Iíve chosen the CD ID field to appear as a hyperlinkfield in the grid view options. Iíve also linked it to a page called CDView.aspx. On that page I hope to show the details of the CD that are stored in the sql database and allow the user to update the information.

My question is how do I pass the CD ID to the CDView page so I can then load up all the details about the CD? If the user clicks the CD ID link say the number 12 how do I pass that number 12 as an int to the CDViewPage?

Any help would be great.
pradeep's Avatar, Join Date: Apr 2005
Team Leader
Create the hyperlink that points to CDView.aspx?CdId=<the cd id>

CaJack's Avatar
Go4Expert Member
Thanks, for the help. from what you've said I've managed to get it working. Cheers, CaJack