Geeks With Blogs

Anirudha gupta

If you want to call a extension method from a c# library when you are working on views then here in this post I am showing you how you can do it.


just go to views and open the web.config file. (do all these step in VWD or VS 13 whatever you use for work)

inside the tag of  system.web.webPages.razor you will find the tag  namespaces which contain too many namespace which shown in intellisense when you work in Views inside your Visual studio.


now  add line like this

  <add namespace="MyCustomDll" />

MyCustomDll is a namespace that came from library that I want to use in my views. Now whenever  I am working in views I can see the extension method in views.



Posted on Thursday, June 12, 2014 4:30 PM | Back to top

Comments on this post: How to Call a extension method from library in mvc project inside the razor view ?

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Anirudha | Powered by: