c# - Changes on controller do not affect the view -


i m on mac , m working on dreamweaver. have this:

using system; using system.collections.generic; using system.linq; using system.web; using system.web.mvc;      namespace mvcmovie.controllers     {         public class homecontroller : controller         {                    public actionresult index()             {                 viewbag.message = "modify what?!?!?!.";                 return view();             }         }     } 

and view:

@{     viewbag.title = "home page"; } @section featured {            <h1>@viewbag.title.</h1>     <h2>@viewbag.message</h2>               } 

whenever make change on controller's viewbag.message variable, change doesn't affect result.

am doing wrong? of course don't compile anything, change value of variable.

any ideas?

of course don't compile anything

that's problem. controller c# code file in project, project should built changes take place (unlike views, compiled on runtime).

update. reason different php frameworks c# compiled language - should processed compiler library/executable executed. on other hand php scripts being run (mostly) directly, without compilation.


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -