Actually you should use string.ToUpper(), for .NET's string searching functions are optimized for searching upper case strings.
Also, you could try to use a StringBuilder instead of a string, but that would require you to rewrite the entire method. The StringBuilder was made for cases like this where you do several changes to a string. Each time you modify the string you create a new string and this will eat memory. So the lines
textBlock = textBlock.Insert(blabla);
textBlock = textBlock.Insert(blabla);
will create three new strings.
If you change the code to use a string builder and append strings to it the code should run faster and take up much less memory.