first understand what ASCII mean.read
this link.
if u are expecting output like 4D-4F-6F-6E.........
u r getting each character's hex value.
read
this to get hex value of each character in ascii.
To achieve above using c# try this code:
<pre lang="c#">
string EncodedString=BitConverter.ToString(Encoding.ASCII.GetBytes(<ur string>));