C# gets previously loaded values of text fields
<p>I have a pretty odd problem. I was working on an item editing page end encountered some odd bug, that ASP passess old values to C# <code>.cs</code> code.</p>

<p>In my <code>Page_Load</code></p>

<pre><code>private int SomeID = 0;
if (!IsPostBack) {
    ...
    SomeID = Convert.ToInt32(Page.RouteData.Values["id"])
    LoadFunction();
}
</code></pre>

<p>Loading function:</p>

<pre><code>DataBaseDataContext db = new DataBaseDataContext();
var Item = db.FirstOrDefault(k =&gt; k.ID == SomeID);

NameTextBox.Text = Item.Name;
PriceTextBox.Text = Item.Price.ToString();
</code></pre>

<p>Saving function:</p>

<pre><code>DataBaseDataContext db = new DataBaseDataContext();
var Item = db.FirstOrDefault(k =&gt; k.ID == SomeID);

Item.Name = NameTextBox.Text;
Item.Price = Convert.ToDecimal(PriceTextBox.Text);
...
db.SubmitChanges();
</code></pre>

<p>I was bothering, why it doesn't save changes for me, so I set breakpoint in <code>db.SubmitChanges()</code> in the saving function (loading works fine). But when I looked up in value preview in VisualStudio, it showed me that it wants to send previously loaded values and not those I edited in my form.</p>

<p>I must be missing something, as it works in other places of my code, but I have no idea what it is.</p>
