Replace a part of a word using c# : <p>I need to change the string "DT1OutPassFail" as "DT4OutPassFail". I need to find "DT1" in the input string and replace it with "DT4" to get the output string. I need to do this using c#. "DT1" is the value in textbox1 and "DT4" is the value in textbox2. I tried the following options. But it dosent work.</p>

<pre><code>string input = "DT1OutPassFail";
string newstring;

newstring = input.Replace(textbox1.Text, textbox2.Text);

newstring = Regex.Replace(input,textbox1.Text, textbox2.Text);
</code></pre>
