Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

viewbag.property -- intellisense ?

Posted on 2013-05-21
1
Medium Priority
?
506 Views
Last Modified: 2013-05-27
How can I change the below so "@Html.ViewBag." provides intellisense ?
-----------------------------------------------
@model IEnumerable<MvcApplication14.Models.Table2>

@{
    ViewBag.Title = "Index";
}

@Html.ViewBag.Title
-----------------------------------------------
http://stackoverflow.com/questions/4719089/asp-net-mvc-3-viewbag-property-provides-no-intellisense
0
Comment
Question by:finance_teacher
1 Comment
 
LVL 22

Accepted Solution

by:
Mrunal earned 2000 total points
ID: 39185436
check this:

http://stackoverflow.com/questions/4719089/asp-net-mvc-3-viewbag-property-provides-no-intellisense

"You cannot expect any Intellisense out of weak types such as ViewData/ViewBag. Use strongly typed views and view models if you want compile-time safety."

http://stackoverflow.com/questions/7611833/razor-intellisense-and-code-formatting-with-mvc-4

also check your use:

http://completedevelopment.blogspot.in/2011/12/stop-using-viewbag-in-most-places.html
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

876 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question