After upgrading an ASP.NET MVC 3 project to MVC 4 I noticed a change in the Razor parser that threw a Parser Error saying: 'Unexpected "string" keyword after "@" character. Once inside code, you do not need to prefix constructs like "string" with "@"'
Firstly this has always working when it was MVC 3 and Razor v1. I may have been getting the syntax wrong all along but if the syntax allowed it was it really wrong?
What I was doing was trying to put some server code in a Razor helper with no surrounding HTML tags, like this example:
@helper Currency1000s(int? value) { if(value == null) {- } else { @string.Format("{0:C0}k", value / 1000.0) } }
Interestingly if I were to replace line 9 with @value
all would be fine. Anyway, it is an easy enough fix, you just need to wrap the string.Format in HTML tags or the text tags as I did here:
@helper Currency1000s(int? value) { if(value == null) {- } else {@string.Format("{0:C0}k", value / 1000.0) } }
Keyword point of view your post gives us some great information, I really like it because first time in my life i am reading this type of information. New Playground tiles Uk for sale visit http://playgroundtilesuk.co.uk/
ReplyDeleteFirst You got a great blog .I will be interested in more similar topics. i see you got really very useful topics , i will be always checking your blog thanks. Now i need to my blog, you can play, relax and fun with games at here
ReplyDeletefriv games 4
jogos 6
friv 5 games
friv 10
That's amazing dude! Now the local best double glazing companies are doing really well by providing highest quality products and adding latest features for more convenience. Don't they?
ReplyDeleteThese things are very important, good think so - I think so too.. a5 booklet design
ReplyDeleteHi there, I discovered your blog per Google bit searching for such kinda educational advise moreover your inform beholds very remarkable for me.. Hotmail Login
ReplyDeleteThere tend to be not many people who can certainly write not so simple posts that artistically. Continue the nice writing.. locksmiths in birmingham
ReplyDeleteI enjoyed over read your blog post. Your blog has nice information, I got good ideas from this amazing blog. I am always searching like this type blog post. I hope I will see again 3313 exam questions
ReplyDeleteWe Provide Best Packers And Movers Ghaziabad List for Get Free Best Quotes, Compare Charges, Save Money And Time, Household Shifting Services .
ReplyDeletePackers And Movers Ghazibad
Excellent article. Very interesting to read. I really love to read such a nice article. Thanks! keep rocking. Oh My Home UK
ReplyDeleteI found that site very usefull and this survey is very cirious, I ' ve never seen a blog that demand a survey for this actions, very curious... Property Management Sarasota Florida
ReplyDeleteWholesale printed custom perfume boxes with the highest quality and affordable prices. Free worldwide Delivery and free Custom Perfume Boxes design.
ReplyDeleteBuy online wholesale printed custom candle boxes and packaging at easy prices and shipping worldwide, with 24/7 customer support. Get a free custom quote now!!
ReplyDeleteBuy online wholesale printed lipstick boxes and packaging at easy prices and shipping worldwide, with 24/7 customer support. Get a free custom quote now!!
ReplyDeleteBuy online wholesale lipstick boxes and packaging at seashore packaging at the easy price Free shipping worldwide with 24/7 customer support.
ReplyDeleteBlackbird packaging provide you with any size, shape design, CBD boxes sooner than any other packaging competitor in the market
ReplyDeletePackaging town is a one-stop solution for the short-run Custom Packaging, Wholesale CBD Boxes needs, and supplies at ease.
ReplyDeleteBlackbird packaging provide you with any size, shape design, custom pet food packaging sooner than any other packaging competitor in the market
ReplyDeletedirect print mylar bags 3.5g direct print mylar bag, available at Your Supplies. This bag comes with cookies holograms. Heat sealable. Fast Shipping.
ReplyDeletegelati bags 3.5g Direct Print on the front and back. % Cali Packs Available at Your Supplies. Heat sealable mylar bags. Fast Shipping.
ReplyDeleteBlackbird packaging provide you with any size, shape design, cbd lotion boxes sooner than any other packaging competitor in the market
ReplyDeletePackaging town is a one-stop solution for the short-run custom apparel boxes needs, and supplies. At affordable prices. Request a free quote now.
ReplyDeletecustom direct printed mylar bags UK in stock now. Ready made Cali pack designs. Fast Shipping at Your Supplies. Custom designs available
ReplyDeletecustom printed mylar bags UK in stock now. Ready made Cali pack designs. Fast Shipping at Your Supplies. Custom designs available
ReplyDeleteI would never have thought of on my own. Your content gives readers things to think about in an interesting way.
ReplyDeleteLove back Solution Specialist
Best Astrologer in New ZealandBest Astrologer in Dubai
Best Astrologer in UK
Best Astrologer in USA
Best Astrologer in Canada
Best Astrologer in Singapore
Best Astrologer in Hong Kong
Best Astrologer in Australia
buy men sweatshirts online from wild goat clothing
ReplyDeletebuy summer collection online from afrozeh
ReplyDeletelahore grocery
ReplyDeletevaccum cleaners
ReplyDeleteShop for Electronic Goods at Al-Fatah, Pakistan's leading chain of departmental stores. Shop from a huge range of top brands Home Appliances, Smart-tech and Phones and Sound bars from Al-Fatah. Shop from huge range of electronics available at Al-Fatah. Avail Free Delivery on orders above 1000 PKR in selected cities.
buy lahore grocery from alfatah at best prices. get free shipping
ReplyDeletebuy online zipper hoodie online from wild goat clothing at best prices. Get Free shipping
ReplyDeletebuy wholesale cbd bath bombs from blackbird packaging at best prices. Get free shipping.
ReplyDeleteBlackbird packaging provide you with any size, shape design, cookie boxes wholesale sooner than any other packaging competitor in the market
ReplyDeleteBuy pret collection 2021 online from Ilaha Clothing at best prices. Get free shipping.
ReplyDeletePackaging town is a one stop solution for the short-run custom apparel packaging needs and supplies. At affordable prices. Request a free quote now.
ReplyDeleteBlackbird packaging company can provide you with any size, shape design, and bath bomb packaging sooner than any other packaging competitor in the market
ReplyDeletePackaging town is a one stop solution for the short-run candle boxes needs and supplies. At affordable prices. Request a free quote now.
ReplyDeletebuy baby food online pakistan from Medisense.pk. Get free shipping
ReplyDeletebuy gym tights online from dshred at best prices. Get free delivery
ReplyDeletebuy dental care products online at best prices from medisense delivered at your doorstep. Get free delivery
ReplyDeletebuy men tank tops online from Dshred at best prices delivered at your doorstep. Get free shipping
ReplyDeletebuy gym tights for women online from dshred at easy prices delivered at your doorstep.get free shipping.
ReplyDeletebuy cosmetics in Pakistan from alfatah at best prices delivered at your doorstep. get free delivery
ReplyDeletebuy baby care products online online from medisense at best prices deloivered at your doorstep. get free shipping
ReplyDeleteBuy citizen ch 453 bp monitor price in pakistan at easy prices from medisense delivered at your doorstep. Get free shipping.
ReplyDeleteBuy baby food online at easy prices from medisense delivered at your doorstep. Get free shipping.
ReplyDeleteBuy hair care supplements at easy prices from medisense delivered at your doorstep. Get free shipping.
ReplyDeletebuy inner wear for girls online from dshred at easy prices delivered at your doorstep. get free shipping
ReplyDeletebuy lounge wear online from Dshred at best prices delivered at your doorstep. get free shipping
ReplyDeleteSometimes you just want to relax at home, but how can one relax if they do not feel comfortable? That is why Dshred is offering the most comfortable Women Loungewear products available. Get our knitted loungewear sets for maximum comfort or our Women’s loungewear tracksuits if you plan to go out for a bit.
ReplyDeletebuy sports bra online in Pakistan from dshred at easy prices delivered at your doorstep. Get free shipping
ReplyDeletebuy electronics online in lahore from Al-Fatah at best prices delivered at your doorstep. Get free shipping
ReplyDeleteBuy home appliances at best prices from Al-Fatah delivered at your doorstep. Get free shipping
ReplyDeleteBuy home appliances at best prices from Al-Fatah delivered at your doorstep. Get free shippingvvvvvvvvvvv
ReplyDeleteBuy dog food online from Al-Fatah at best prices delivered at your doorstep. Get free shipping
ReplyDeleteBuy online Latest fashion shorts pakistan from Ndure. Fast Shipping.
ReplyDeleteBuy online Latest fashion trouers for women from Ndure. Fast Shipping.
ReplyDeleteFrom Ndure buy the best quality men cotton t-shirts online. Quick delivery.
ReplyDeleteBuy grocery in Pakistan at best prices delivered at your doorstep. get free shipping
ReplyDeleteSince the web developers charged on an hourly basis in most of the cases, the total cost dropped directly in proportion with the decrease in incorporation of tools and softwares. mediajx com
ReplyDeleteShop afrozeh 2022 online in Pakistan at Highway Fashion. Buy Afrozeh collection Online In Pakistan. Latest collection luxury edition now available.
ReplyDeleteWe recently covered the importance of professional website design as well as how a website design company can help you benefit from a customized website. A professional website design company can assist you in leveraging the power of the Internet in a number of ways. Website Design Company Dubai
ReplyDeleteWant To Approach An Affordable Garage Door Roller Replacement Arkansas? Feel Free To Call Us, As We Provide You With Professional Services In This Matter. Whether Your Door Is Misaligned, Broken, Or Their Springs Or Cables Are Not Doing Well, We Can Fix It For You.
ReplyDeletenoticed a change in the Razor parser that threw a Parser Error saying: 'Unexpected "string" keyword after "@" character.
ReplyDeletevisit link my websiteTel-U
your doorstep. Get free shipping
ReplyDeleteChack
Seo Expert Google,
I enjoyed over read your blog post. Your blog has nice information, I got good ideas from this amazing blog. I am always searching like this type blog post. I hope I will see again. Please visit here Ceramic Butterfly Valve
ReplyDelete