asp.net mvc3 or mvc4 html helper is not working -


//part of index.cshtml     @{          viewbag.title = "home";     }      <body>     <h2>home</h2>     <%= viewdata["greeting"] %> , world (from view)!     </body>      //homecontroller      using system;     using system.collections.generic;     using system.linq;     using system.web;     using system.web.mvc;      namespace partyinvites_2.controllers     {         public class homecontroller : controller         {             //             // get: /home/              public viewresult index()             {                 int hour = datetime.now.hour;                 viewdata["greeting"] = (hour < 12 ? "good morning" : "good evening");                  return view();             }           }     } 

hello all, first time asking question here , started learning , exploring asp .net mvc 4.5 trying figure out html helper work apparently when run application on broswer <%= viewdata["greeting"] %> , world (from view)! not value of helper viewdata either doing wrong or maybe visual studios not support html helpers or maybe have change setting make work, try downloading updates didn't work either, try made new projects under .net framework 3.5 , 4 , 4.5 options doesn't seem work @ all, appreciated, thanks!


Comments