In gridview how to use rowcommand event for a button

I am using a gridview in aspx and i have two pages that registration and details.aspx once registration completed it should goto details page in details.aspx i have kept a gridview in that GV i am supposed be use row command event for a button it should show the all the rsults for the students with the edit button as the last column for all the students i used item template for that. but in row command event i dont know the function to write if user clicking edit it should goto the edit page using the userid the id should be noon editable mode and other fields can editable.

incorrect syntax near ” unclosed quotation mark after the character string ‘)’

I’ve created a Web Form using C# within Visual Web Dev 2010 Express and it contains text boxes / labels (based on check boxes) but when I run the code to fails on running the SQL command. I have gotten the code to work before using only 3 text boxes but doesn’t seem to work when I expand the code.