Managing State in ASP.NET MVC – A Practical Guide

If you’ve been working with ASP.NET Web Forms, you might be familiar with ViewState — a feature that automatically remembers control values between requests. When you move to ASP.NET MVC, things change. MVC follows the stateless nature of HTTP, which means each request is independent. The framework doesn’t automatically preserve data between requests — you … Read more

Use of Tuple in C#

When writing C# code, we often need to return multiple values from a method. Traditionally, we might create a custom class or struct, or use out parameters. However, since .NET Framework 4.0, we have another option — tuples. Tuples provide a lightweight way to group multiple values into a single object without creating a new … Read more

Async Await in C#

As developers, we often write code that performs tasks like calling APIs, reading files, or querying databases. These operations take time — and if we wait for them to complete before doing anything else, our applications can freeze or feel sluggish. That’s where asynchronous programming in C# comes in. It allows your code to continue … Read more