MVC model not saving the value : <pre><code>        var ticketnumber = TempData["ticketId"] as Ticket;
        ticketnumber.TicketId = model.TicketId;
        db.SaveChanges();
            HttpPostedFileBase file = Request.Files["ImageData"];
            UploadRepository service = new UploadRepository();
            int i = service.UploadImageInDataBase(file, model);
</code></pre>

<p>I have the value inside my tempdata but when i try to assign the value of it to the model value it doesnt save and even in debug it tells me the value hasnt changed so i just dont get what i am doing wrong.</p>
