void TracksGridView_RowCommand(object sender, GridViewCommandEventArgs e) { Int32 trackOrder = 0; switch (e.CommandName) { case "MoveUp": trackOrder = Convert.ToInt32(e.CommandArgument); MediaTrack.MoveTrackUp(thePlayer.PlayerId, trackOrder); RedirectToThisPage(); break; case "MoveDown": trackOrder = Convert.ToInt32(e.CommandArgument); MediaTrack.MoveTrackDown(thePlayer.PlayerId, trackOrder); RedirectToThisPage(); break; case "EditTrack": EditTrack(e.CommandArgument.ToString()); break; default: break; } }