Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
The bin folder doesn't contain some dll. For instance, System.Web.Configuration or System.Configuration which can help me to get webconfig values. Others like system.web.Optimization is needed. How can i add a new dll?
Hi Walter
In the "web.config" file in "Views" directory of your project (notice it is not the main web.config in project's root), find this section:
<system.web.webPages.razor> <pages pageBaseType="System.Web.Mvc.WebViewPage"> <namespaces> <add namespace="System.Web.Mvc" /> <add namespace="System.Web.Mvc.Ajax" /> . . <!-- etc --> </namespaces> </pages> </system.web.webPages.razor>
you can add your custom namespace like this:
<add namespace="My.Custom" />
Thanks,
Alex
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Add new dll to be used in razor
The bin folder doesn't contain some dll. For instance, System.Web.Configuration or System.Configuration which can help me to get webconfig values. Others like system.web.Optimization is needed. How can i add a new dll?
Hi Walter
In the "web.config" file in "Views" directory of your project (notice it is not the main web.config in project's root), find this section:
you can add your custom namespace like this:
Thanks,
Alex
is working on a reply...