How to transfer a value from a grid in a modal popup to a textbox on the page in ASP. NET?

Anybody knows how to transfer a value from a grid in a modal popup to a textbox on the page? When you click on a value from the grid view the value should be transferred to the textbox. . . . .