A. While asking a previous question I was not sure whether to conclude by asking "A" or "B".
B. Asking a previous question I was not sure whether to conclude by asking "A" or "B".
C. While I was asking a previous question I was not sure whether to conclude by asking "A" or "B".
Are all of the above sentences grammatical? If so, how are they different in meaning and how can one avoid using "asking" two times?