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.

{Html.RenderPartial

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 .

ASP.NET vNext

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

 

Visual Studio “14” CTP now available

Some hours back , the Visual Studio “14” CTP was released. An early preview of the next version of Visual Studio. You can find the Visual Studio and .NET release announcements on Soma’s blog. You can find a complete list of new features in the Visual Studio “14” CTP knowledge base article.

This Visual Studio “14” CTP brings together several new technologies that we recently announced including:

  • The .NET Compiler Platform, also known as “Roslyn,” which includes the upcoming version of our managed compilers for C# and VB as well as an API that enables developers to integrate with the VS compiler and language service more easily than they can today. You can read more about the .NET Compiler Platform on the C# and VBteam blogs.
  • Updates to the Visual C++ Standard Library, added utility functions, manipulators, functions, and several bug fixes that will improve productivity. To learn more about all the changes visit the C++ team blog.
  • Tooling for ASP.NET vNext. ASP.NET vNext is a lean and composable .NET stack for building modern web applications for both cloud and on premises servers. For more information about ASP.NET vNext go to ASP.NET vNext website and check out the ASP.NET team blog.

CTPs provide early adopters with an opportunity to try out the new and improved product features, and the ability to share feedback with the product team.

Please report bugs using Connect and share your suggestions through Send-a-Smile from within the IDE or on our UserVoice site.

Note, Visual Studio side by side support is not available on this early build. Do not install this CTP on a machine with any other version of Visual Studio installed.

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

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)