Blog

Page 244 of my articles, tutorials, and thoughts

Latest Articles

Cover Image for How to add Web API to an existing ASP.NET MVC 4 Web Application project?

How to add Web API to an existing ASP.NET MVC 4 Web Application project?

Published on September 2, 2023

# How to add Web API to an existing ASP.NET MVC 4 Web Application project? šŸ˜ŽšŸ’»šŸŒ So you want to add a cool Web API to your existing ASP.NET MVC 4 Web Application project? That's awesome! In this guide, I will walk you through the steps to get it up and r

Cover Image for Difference between ApiController and Controller in ASP.NET MVC

Difference between ApiController and Controller in ASP.NET MVC

Published on September 2, 2023

# Understanding the Difference Between ApiController and Controller in ASP.NET MVC šŸ¤”šŸŽ® So, you've been delving into ASP.NET MVC 4 beta and stumbled upon two types of controllers: `ApiController` and `Controller`. 😮 It's understandable to feel a bit conf

Cover Image for Styles.Render in MVC4
c#

Styles.Render in MVC4

Published on September 2, 2023

šŸ“ Blog Post: Unveiling the Mystery of Styles.Render in MVC4 šŸ•µļøā€ā™‚ļø Have you ever come across the mysterious @Styles.Render function in a .NET MVC4 project? šŸ¤” Are you wondering how it works and which file it actually calls? šŸ¤·ā€ā™€ļø Don't worry, you're not

Cover Image for OwinStartup not firing

OwinStartup not firing

Published on September 2, 2023

# OwinStartup Not Firing: A Troubleshooting Guide šŸš€ Are you facing the frustrating issue of your OwinStartup configuration code not firing anymore? 😫 Don't worry, we've got your back! In this guide, we'll walk you through some common issues and provide

Cover Image for Which version of MVC am I using?
.netversion

Which version of MVC am I using?

Published on September 2, 2023

## 🌐 Which version of MVC am I using? šŸ¤” Are you feeling a little lost and unable to determine which version of MVC you are using? Don't worry, you're not alone! Many developers struggle with this question, especially when working with older versions of

Cover Image for Getting full URL of action in ASP.NET MVC
c#.net

Getting full URL of action in ASP.NET MVC

Published on September 2, 2023

šŸ” **Getting full URL of action in ASP.NET MVC** 😃 Hey fellow coders! Today we will tackle a common question asked by ASP.NET MVC developers: "Is there a built-in way of getting the full URL of an action?" šŸ¤” We all know that hardcoding URLs in automate

Cover Image for Why is JsonRequestBehavior needed?
c#.netsecurity

Why is JsonRequestBehavior needed?

Published on September 2, 2023

# Why is JsonRequestBehavior needed? šŸ¤” Have you ever wondered why, when using the `[HttpPost]` attribute to restrict `HttpGet` requests to your action, you still need to include `JsonRequestBehavior.AllowGet` in every `JsonResult`? šŸ¤·ā€ā™‚ļø It can be confus

Cover Image for Why does ASP.NET webforms need the Runat="Server" attribute?

Why does ASP.NET webforms need the Runat="Server" attribute?

Published on September 2, 2023

šŸ“ ASP.NET WebForms: Why does it need the `runat="server"` attribute? šŸ¤” Are you confused about why you need to include the `runat="server"` attribute on all your ASP.NET controls? Do you find it frustrating that it is a mandatory attribute, with no other

Cover Image for Reflecting parameter name: abuse of C# lambda expressions or syntax brilliance?
c#

Reflecting parameter name: abuse of C# lambda expressions or syntax brilliance?

Published on September 2, 2023

# Reflecting parameter name: abuse of C# lambda expressions or syntax brilliance? šŸ¤”šŸ’» So, you stumbled upon a fascinating yet repulsive syntactic trick used in the MvcContrib Grid syntax. It sets the style attribute of the generated HTML using a paramete

Cover Image for How can I properly handle 404 in ASP.NET MVC?

How can I properly handle 404 in ASP.NET MVC?

Published on September 2, 2023

# How to Properly Handle 404 in ASP.NET MVC So, you're building an ASP.NET MVC application and want to know how to handle 404 errors like a boss. šŸ•¶ļø Don't worry, I've got you covered! In this article, I'll explain the common issues and provide easy solut