SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    Learning...
    Join Date
    Jan 2003
    Posts
    781
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MVC3 - Razor view engine, why i need to reference class library on individual pages?

    I have referenced the class library in web.config under pages -> namespaces. Why do i have to reference these again on my individual pages?

    I think i have missed some thing critical due to which reason i have to do this. Any help with this will be greatly appreciated.
    The beauty of life is not dependent on how happy you are,
    but on how happy others can be because of you...

  2. #2
    Learning...
    Join Date
    Jan 2003
    Posts
    781
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I had my references under the global web.config. I need to move these to individual areas web.config also. But why?
    The beauty of life is not dependent on how happy you are,
    but on how happy others can be because of you...

  3. #3
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,633
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Pages.Namespaces is a tool for WebForms and the WebForms view engine. Razor doesn't look there but rather to it's own more localized configuration. It was a [good] design decision.

  4. #4
    Learning...
    Join Date
    Jan 2003
    Posts
    781
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by wwb_99 View Post
    Pages.Namespaces is a tool for WebForms and the WebForms view engine. Razor doesn't look there but rather to it's own more localized configuration. It was a [good] design decision.
    Thanks.
    The beauty of life is not dependent on how happy you are,
    but on how happy others can be because of you...

  5. #5
    Resident OCD goofball! bronze trophy Serenarules's Avatar
    Join Date
    Dec 2002
    Posts
    1,911
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)
    Go into your /Views folder and edit the web.config there, then see if your razor views doesn't pick it up. =)

  6. #6
    Learning...
    Join Date
    Jan 2003
    Posts
    781
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Serenarules View Post
    Go into your /Views folder and edit the web.config there, then see if your razor views doesn't pick it up. =)
    Thats the first thing i did, after global web.config. Views under my areas don't pick these up. I had to moves these to area web.config also.
    The beauty of life is not dependent on how happy you are,
    but on how happy others can be because of you...


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •