How to fetch value of hidden filed from selected row in gridview

How to fetch value of hidden filed from selected row in gridview.Scenario:I have a grid view.. the grid view contains hidden field.I want when a particular row of the gridview is selected then the value of the hidden field should be retained in viewstate and then when Update button is clicked i want to pass this value as a query string . How to do this. Will using viewstate be good in this case???