MVC3 Razor View Project using VB.NET gives Syntax error in Error List window for all vbhtml pages - vb.net

Using MVC3 and Razor View engine, I created a VB.NET web application in VS 2010. This creates the default Account and Home Controller along with corresponding Action Views.
Now if I open any vbhtml file I get the following error message in the Error List window.
Error 50 Syntax error. C:****\MVC3AppVB\Views\Account\LogOn.vbhtml MVC3AppVB
(See screenshot here http://www.flickr.com/photos/7672540#N07/5469248676/)
Who ever this app compiles and runs without any problem. I tried to create the same project using C# and there is no error message in the Error List Window.
Can anyone explain why this error message shows up only for VB and not for C#?
Thanks in advance.

The problem is with MVC3 and webpage 1.0 tooling. This issue has been answered in codeplex.

Probably some bug with the Intellisense. Try recompiling the project. Unfortunately the Razor Intellisense is far from perfect. I hope it will be improved in future releases of Razor.

Related

Construction #User.IsInRole("admin") return only false

I have got a short question: recently I have created a web application in ASP.NET Core 3.1, where I have been using Identity framework to authorize/autenthize of an user.
In navigation part of page I would like to display a role of user, so I wrote following code snippet in partial view:
#if (User.IsInRole("admin") {...}
But there is a problem, mentioned construction permanently returns "false".
Any idea to fix this error?
Thank you very much.

Error adding WrapPanel

I created a new blank Windows 10 Universal app and tried to add a WrapPanel exactly as per the sample code in the link: WrapPanel XAML Control
I am getting the following error message on wrapPanel:WrapPanel
The name "WrapPanel" does not exist in the namespace "using:Microsoft.Toolkit.Uwp.UI.Controls.WrapPanel"
I have already added xmlns:wrapPanel="using:Microsoft.Toolkit.Uwp.UI.Controls.WrapPanel" as per sample code.
Full code and errors (please click image for better quality):
I have tried to Clean and Build/Rebuild but it doesn't help. I also made sure that I am targeting the latest Windows 10 version:
Please help!
Update: I tried using xmlns:wrapPanel="using:Microsoft.Toolkit.Uwp.UI.Controls"
as suggested but I still get this error. Again, I tried clean and build/rebuild and am getting the a similar error:
The documentation has a typo. The WrapPanel control is not in the Microsoft.Toolkit.Uwp.UI.Controls.WrapPanel namespace, but rather just in Microsoft.Toolkit.Uwp.UI.Controls, so use the following
xmlns:wrapPanel="using:Microsoft.Toolkit.Uwp.UI.Controls"
And it should work as expected. I will push an update for the docs.

VS 2010 to VS2012 and Project Name Change - Area forms HttpPost no longer working

I just created a new project in VS 2012 - basically replicated what I had in 2010 but changed all the namespaces to a different project name. All is working except my Area forms are no longer being directed to the HttpPost version of the action. Instead, the submit is redirecting to the HttpGet. Any ideas? My Areas appear to be registered correctly and no code has changed (other than namespace references).
Okay, I figured it out! Not sure why this didn't work, but for my other routes, I was using LowercaseRoutesMVC4 and didn't apply this to my Area routing. Not sure why this would break it, but it seems to be working now.

make asp.net MVC 4 views compiled / give errors on compilation, not only on first access

I have a Asp.Net MVC 4 View (Razor), which includes a model like below:
#model Project.Models.TestModel
The problem is that if I go the project, and rename TestModel to TestModel2, and I click on rebuild project, no errors are given. If I open up the .cshtml file directly, then I do get the error there.
Can you enforce such errors to be given immediately at compile time?
Open *.Web.csproj file and change this:
<MvcBuildViews>false</MvcBuildViews>
to true

MVCAwesome, MVC4 and NuGet

I created a new MVC4 project using Razor syntax, and used NuGet to add MVCAwesome.
Looking at this page, it appears that all the expected files and configuration files appear to be in place. I made the edit to the Views/Web.config as directed.
When I try to reference any Awe() controls however, the reference to Awe() shows up in red text, and I get an error message: Cannot resolve symbol Awe()
#Html.Awe().DatePickerFor(model => model.BirthDate).ChangeMonth(true).ChangeYear(true)
Has anyone gotten this to work? What am I missing?
Just FYI, I was able to contact the maintainer of this library. It turns out that in this newer, NuGet version of the controls, you don't need the Awe() part.
For some reason, DatePickerFor still seems to be missing, but I do see other controls there from the package.