Last post Sep 20, 2012 01:50 AM by mikehi
Jul 14, 2012 06:19 AM|SmaRT_AleCK|LINK
i want user webgrid in view(by razor) but i give
"WebGrid" the type or namespace name does not exist in the namespace are you missing an assembly reference.
how can i fix that use?
Jul 14, 2012 09:05 AM|bkis1112|LINK
Add System.Web.Helpers to your reference to use WebGrid
Jul 14, 2012 05:41 PM|SmaRT_AleCK|LINK
already added that referans :S
Jul 14, 2012 06:13 PM|CPrakash82|LINK
How is your View File look like?
Jul 15, 2012 04:58 AM|SmaRT_AleCK|LINK
when I select "Empty" template then webgrid is running
but it doesn't work in "Basic" template.
so Basic template project's has system.web.helpers referance.
Jul 16, 2012 11:55 PM|Young Yang - MSFT|LINK
What is the "Basic" tempate? The "Internet Application"? It works fine on my PC if we have referenced the system.web.helpers.
Jul 17, 2012 02:24 AM|SmaRT_AleCK|LINK
"Basic" template is a MVC 4 template.
My MVC4 templates;
Sep 20, 2012 12:57 AM|mikehi|LINK
Hi, I had the same problem and finally found an odd solution.
1. Open Nuget Package Manager for the project
2. Remove Microsoft ASP.NET MVC 4 package from Installed packages.
3. Re-install the same package you just removed.
Apparently, the above action modifies
your web.config file something and fixes the problem.
Hope this helps!
Sep 20, 2012 01:50 AM|mikehi|LINK
I have found that:
- Actually you don't need to remove and reinstall MVC 4 package.
- Just add reference to System.Web.Helpers 22.214.171.124 dll which Basic template does not include by default.
- After adding the reference, you need to open property for the dll and change Copy Local to True.
(This is the trick!)