Replacing a certain word in a txt file
<p>Following requirements we have users, their passwords and their profile picture stored in a .txt file. A user can be redirected to a profile modification page where they can change their password and/or password picture. </p>

<p>I need to replace the password and/or profile picture name in the .txt file when the user clicks OK.</p>

<p>The users.txt file is laid out like:</p>

<pre><code>mike mike Avatar1
jessica123 123jessica Avatar4
mohd MoHd Avatar3
xiao AxiaoA Avatar2
anna abcANNAabc Avatar1
</code></pre>

<p>After doing some research i've tried using:</p>

<pre><code>userFilePath = userFilePath.Replace(Session["password"].ToString(),
                                    passwordTextBox.Text);
</code></pre>

<p>The original password is stored on log-in, through the session variable which I was using to find the original text in the file.</p>

<p>But this doesn't work. I'm pretty new to c#. Any help would be appreciated.</p>
