How to input \t from asp.net
<p>I'm trying to input a control character from an asp.net form.  For example I want a user to be able to enter \t into a text box and it be \t not \ \t (The space is there as one of them gets escaped if I put them together). What's the best way to go with this? I've been staring at it continuously now for quite a while and the answer isn't jumping out at me.  Thanks.</p>

<p>Update:</p>

<p>Thanks guys, but I've just answered myself.</p>

<p>I've just found in Regex the static Unescape method, so in my web app I am now doing:</p>

<p>(Where tb is an asp.net TextBox)</p>

<pre><code>        var inputText = tb.Text;
        if (inputText.Length == 2)
        {
            var escaped = System.Text.RegularExpressions.Regex.Unescape(inputText);
            if (escaped.Length == 1)
            {
                var character = escaped.ToCharArray()[0];
                if (char.IsControl(character))
                {
                    inputText = character.ToString();
                }
            }
        }
</code></pre>
