highlighting text according to output of a text to speech. in Asp.net c#
<p>i am trying to highlight words read by the text to speech but its not working. until now i made:</p>

<pre><code>    string startSpan = "&lt;span style=" + "background-color:Yellow" + "&gt;";
    string endSpan = "&lt;/span&gt;";

 //button onclick
protected void speak_Hope(object sender, EventArgs e)
    {
            speaker.Rate = -4;
            speaker.SpeakAsync(announce.InnerText);
            speaker.SpeakProgress += new EventHandler&lt;SpeakProgressEventArgs&gt;    (speaker_SpeakProgress);
            System.Diagnostics.Debug.WriteLine("processing");

    }


void speaker_SpeakProgress(object sender, SpeakProgressEventArgs  e)
    {
        counter2 = e.CharacterPosition - 10;
        counter3 = e.Text.Length;
        counter4 = counter2 + counter3;
        System.Diagnostics.Debug.WriteLine(e.CharacterPosition - 10 + " next one" + e.Text);
        announce.InnerHtml = announce.InnerText.Substring(0, counter2) + startSpan + announce.InnerText.Substring(counter2, counter3) + endSpan + announce.InnerText.Substring( announce.InnerText.Length - 1);


    }
</code></pre>

<p>am i doing it right or is there any other way, can it be done in a javascript manner?
thanks alot </p>
