Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3348914
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:36:02+00:00 2026-05-18T01:36:02+00:00

I just downloaded the MVC 3.0 RC and I’m excited to start using it,

  • 0

I just downloaded the MVC 3.0 RC and I’m excited to start using it, especially the Razor view engine. However, due to a few stick in the mud type people here, we are stuck using VB.NET instead of C#.

When I started trying it out, I noticed some quirks. If you are creating a Razor view using CSHTML, you can write code like this:

@foreach(string genreName in Model.Genres)
{
    <li>@genreName</li>
}

Razor will automatically detect that the <li> text is an HTML tag and will switch out of “code mode”. With a VB.NET VBHTML file, this doesn’t seem to be working. It’s making me put the @: keyword in front of each line like this:

@For Each genreName As String In Model.Genres
    @:<li>@genreName</li>
Next

If I don’t have it there, I get a runtime error. Also, the <text></text> tags don’t seem to work.

Anybody know what’s going on here or whether there’s a workaround?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T01:36:03+00:00Added an answer on May 18, 2026 at 1:36 am

    I would say the reason it’s required in Vb.net is vb allows xml elements inline whereas c# does not.

    Dim xmlMarkup = <someElement>Values</span>
    

    Because of this the natural parser for vb must behave differently than c# so you have to tell the parser to escape back to html by using the @. You can use @ and @:.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi i just downloaded MVC 3 and found an new view engine called RAZOR.
I just downloaded the release version of MVC 2, pretty excited about that! Problem
I just downloaded 2.2.1 and i've seen that my input view does not adjust
I just downloaded C# SDK and ASP.NET MVC sample, modified it to work with
i have downloaded sample mvc application from here http://ravenmvc.codeplex.com/releases/view/45994 It works just fine. But
I am just following along the spring tutorial ( http://static.springsource.org/docs/Spring-MVC-step-by-step/part1.html ) I downloaded this
I have started using Ninject 2 (downloaded from Github yesterday including the MVC extension
I just downloaded the ASP.NET MVC beta and the templates are not StyleCop compliant.
I've downloaded the mini profiler: http://code.google.com/p/mvc-mini-profiler/ I'm using ASP.net 4.0 with webforms (VS 2010).
I just downloaded MVC and I am going through a tutorial. Everything goes fine

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.