.NET Daily

Recommended Resources


Popular Content


Navigation
Tagasp.net core
Featured

Web Development

ASP.NET Core. Best way to Keep Variables between Page Requests

Posted on August 19th, 2017.

In case you want to keep variables between page requests, ASP.NET CORE MVC and ASP.NET MVC provides a more elegant solution than the classic ViewState. It is called TempData. The usage of it is pretty straightforward. The example from below shows how I assign a variable to preserve the sort state of a column in a list table:...

Featured

Microsoft ASP.NET

ASP.NET Core and EF: The instance of entity type ‘User’ cannot be tracked

Posted on July 9th, 2017.

This exception caused me to lose a bit more than expected before finding the right solution. That happened even though the ASP.NET team already documented this Entity Framework behavior very well here but, you know, who has time to read that much documentation… So, the full exception message is the following: InvalidOperationException:...

Featured

Microsoft ASP.NET

ASP.NET Core – How to Get and Write values to HTML Inputs outside the scope of a Model

Posted on May 8th, 2017.

When you come from ASP.NET WebForms directly to ASP.NET Core, you’ll see that lots and lots of old practices for getting an adding data into web page forms have changed completely. For example, ASP.NET Core heavily rely on Models for managing form data while on ASP.NET WebForms you were totally in charge of managing that part....