Razor partial view – Html.RenderPartial – Cannot implicitly convert type ‘void’ to ‘object‘

Razor Html.RenderPartial “Cannot implicitly convert type ‘void’ to ‘object’.”
When I tried to render my partial view with a standard call I got a compile time error saying “Cannot implicitly convert type ‘void’ to ‘object’.”

The reason behind this compile time error was the RenderPartial() call renders its result directly to the response object and cannot be used like a simple string result.

To resolve the issue, all you have to do is enclose the call in a code block.


ASP.NET vNext – Quick Introduction

A few weeks ago, microsoft announced ASP.NET vNext and plans for the future of .NET on the serverASP.NET vNext is designed for both cloud and server, offering SxS installation options and significantly enhanced developer productivity, through a modular and highly configurable framework and web stack.

ASP.NET vNext is a lean and composable framework for building web and cloud applications. ASP.NET vNext is fully open source and available on GitHub. ASP.NET vNext is currently in preview. Using ASP.NET vNext you will be able to compile C# 6 and VB with the Roslyn compilers, host ASP.NET vNext apps on the server or cloud, compile your Windows Store apps with the .NET Native ahead of time compiler, and enjoy faster desktop and server apps with the Next Generation JIT.

ASP.NET vNext includes updated versions of MVC, Web API, Web Pages, SignalR and EF. The key improvement with these frameworks is that MVC, Web API and Web Pages have been merged into a single programming model. ASP.NET vNext is an open source project released under Apache License Version 2.0 by Microsoft Open Technologies, Inc. You can follow its progress and find instructions on how to contribute on https://github.com/aspnet .


To learn more about the ASP.NET vNext announcements, check below links:


What is exactly One ASP.NET?

There was a common question from all the corners, as a .NET developer what  would be the project template  that you are going to use for your web application. The answer would simply WebForms if the question was raised prior to the introduction of ASP.NET MVC.

Since the release of the ASP.NET MVC Framework in 2009, the developers had a major choice to make when starting up a new project: Web Forms or MVC?

What if I want to use both? What if a third choice comes along like Web API, SignalR ?

Microsoft has finally brought these components all together, and the result is One ASP.NET.

ASP.NET MVC Web Forms Web API Signal R all together


One ASP.NET helps in Unified Dialog and made the web app to use Web Forms , Web API, MVC together, and also came with some cool Scaffolding features etc.

Starting with Visual Studio 2013,  there is now only one web project type in Visual Studio.

One ASP.NET Project TypeWhen you choose this project type to start with, you will be propmpted with additional configuration options begin working with your project.

One ASP.NET - New Project

If you look closely, you’ll see a new set of check-boxes which will allow you to include the folders and core references for other technologies outside of the major one that you selected.

Choose Reference Items - One ASP.NET


As per your project template and checkbox selection all the necessary configuration and directories will be done for you automatically. Now when you attempt to add a new item to your project, the options lists just about everything you could think of.

One ASP.NET Add New Item

You might be interested in video “Introducing One ASP.NET” by Scott Hunter.


ASP.NET MVC Release History, Supported Visual Studio versions and .NET Framework

ASP.NET MVC is a web application development framework built on top of Microsoft’s .NET Framework. ASP.NET MVC framework is a lightweight, highly testable presentation framework that is integrated with existing ASP.NET features.

Here I’m listing down the ASP.NET MVC versions and its release dates,

ASP.NET MVC version history , release dates, supported visual studio and .net frameworks

Let us see the stable ASP.NET MVC versions and its supported Visual Studio versions ( and .NET Frameworks ) together,

ASP.NET MVC 1 – Visual Studio 2008 and Visual Studio 2008 Service Pack 1 (.NET Framework 3.5)

ASP.NET MVC 2 – Visual Studio 2008 and 2010 (.NET Framework 3.5, 4.0)

ASP.NET MVC 3 – Visual Studio 2010 (.NET Framework 4.0)

ASP.NET MVC 4 – Visual Studio 2010 Service Pack 1 and Visual Studio 2012 (.NET Framework 4.0, 4.5)

ASP.NETMVC 5 – Visual Studio 2013 (.NET Framework 4.5, 4.5.1)

App_Offline.htm, an easy way to take asp.net web application offline

You can simply take down an ASP.NET 2.0 or later application offline temporarily by uploading a file called App_Offline.htm in the root of a web application directory.  While the App_Offline.htm file exists, any requests to the Web site are redirected to this file. The file displays a friendly message that tells clients that the Web site is being updated or down due to some reasons.

This is very handy when we do deployments manually. We just need to put App_Offline.htm file in root directory of web application and the ASP.NET runtime will detect the existence of  App_Offline.htm, if it exists, then the ASP.NET runtime will shut-down the application, unload the application domain from the server, and stop processing any new incoming requests for that application.  ASP.NET will also then respond to all requests for dynamic pages in the application by sending back the content of the App_Offline.htm file

When all Web site files have been copied, you can delete the App_offline.htm. Once removed, the next request into the application will cause ASP.NET to load the application and app-domain again, and all things will continue to work as normal.ASP.NET Web Site Application Offline

Most of the automated publishing tools or options also takes advantage of App_Offline.htm

Note: Always make sure that your App_offline.htm page is at least 512 bytes by adding filler tags or hidden text or comments as In Internet Explorer if  “Show Friendly Http Errors”  is set to true, and a server returns a non HTTP-200 status code with less than 512 bytes of content, IE will not show the returned HTML and instead substitutes its own generic status code message. In IE6 “Show Friendly Http Errors” is set to true by default.