Intellisense for CSS in VS2013 MVC

A very nice feature which is new in Visual Studio 2013 is the code completion / intellisense for MVC pages. It's a bit faded in the example, but you can see the bootstrap pull-left and pull-right.

 

 

Passing ViewData to Html.Partial

If you want to pass more than just a model to your partial page then you can use the following.

Html.RenderPartial(
                      "NameOfThePartial"
                     , TheModel
                     , new ViewDataDictionary(this.ViewData){ { "index", index } }
                     ); 

 

 

In addition to the Viewdata which is already in the dictionary you pass in the additional index value. Hope this is of any help.

Divelicious - Migration to MVC, install bootstrap (3.0)

We are migrating the existing web.forms website to MVC, in combination with Bootstrap 3.0 which got release 24-08-2013. During the migration we will try to blog the steps which are according to us interesting to write about. First step is to add Bootstrap to the website using NuGet.

Right Click the Website project and choose Manage NuGet Packages... 

Select Bootstrap from NuGet

 Type bootstrap in the searchbox and depending on your wishes select the types of versions which need to be displayed (stable / prereleases) . You will notice that the bootstrap package shows up in the list. Select is and install.

Files where added to the project

The installation installs JQuery if it was not already installed and the stylesheets and scripts to get started.

 

Installed files 

You'll notice the files which where installed in the Content and Scripts folder. The Custom Less file is added by me to add custom styles or overrides to bootstrap if needed.

 

How to start with your first MVC application

Just added a walktrough about how to create your first MVC application and some additional information about the MVC pattern.

http://www.techned.nl/page/Creating-your-first-MVC-application

Reading: Pro JavaScript for Web Apps (Adam Freeman)

I would recommend reading this book which was written by Adam Freeman.

 "This is my 15th book about technology, and to mark this, Apress asked me to do something different: share the tools, tricks, and techniques that I use to create complex client-side web apps. The result is something that is more personal, informal, and eclectic than my regular work. I show you how to take industrial-strength development concepts from server-side development and apply them to the browser. By using these techniques, you can build web apps that are easier to write, are easier to maintain, and offer better and richer functionality to your users."

 

Reading: Pro ASP.Net MVC4

I would recommend reading this book which was partially written by Steve Sanderson, who is a great speaker and writer. Definatelly worth reading.

A new beginning

Started this new blog, not sure if the old content will be migrated. Aim is to collect anything related to the .Net framework and share knowledge.

Sponsored by

Calendar

<<  August 2018  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
272829303112
3456789

View posts in large calendar

RecentComments

TextBox