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
Just Visit for Best info:
ReplyDeleteMovers and Packers in Pune
Movers and Packers in Bangalore
Movers and Packers in Hyderabad
If you are looking Best Packers and Movers so Visit at :
ReplyDeleteMovers and Packers in Delhi
Movers and Packers in Mumbai
Movers and Packers in Gurgaon
If you are looking Best Packers and Movers so Just Visit At:
ReplyDeleteMovers and Packers in Noida
Movers and Packers in Chennai
Movers and Packers in Ghaziabad
Movers and Packers in Faridabad
Movers and Packers in Navi Mumbai
Movers and Packers in Thane
A very awesome blog post. We are really grateful for your blog post. You will find a lot of approaches after visiting your post. I was exactly searching for. Thanks for such post and please keep it up. Great work.Marble India
ReplyDeleteGood post. I learn some thing tougher on distinct blogs everyday. Most commonly it really is stimulating to learn to read content material from other writers and exercise a specific thing there.Luxury Escapes
ReplyDeleteNot all are true. Everyone has their own way of thinking but I think they have to reconsider. I like to argue for the most accurate results.
ReplyDeletehttp://fivenightsatfreddysplay.com
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?
ReplyDeleteBy reading this article I get a lot of lessons and this is very useful . cara menggugurkan kandungan
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
ReplyDeletePest Control services in Kirti Nagar
ReplyDeletePest Control services in Modi Nagar
Pest Control services in Patel Nagar
Pest Control services in Rajouri Garden
Pest Control services in Tilak Nagar
Pest Control services in Janakpuri
Pest Control services in Paschim Vihar
There tend to be not many people who can certainly write not so simple posts that artistically. Continue the nice writing.. locksmiths in birmingham
ReplyDeleteIndia's only Digital News Channel with True Voice of India.
ReplyDeleteFinding #Championsofchange2018 #rahulshivkant
the universal post teams
the universal post youtube
loksabha election 2018
top trending news
top viral news
best trending news in india
Thanks for posting Really Such Things. I should recommend your site to my friends.
ReplyDeleteMenmyshop
Car Stereo
Double Din Android Player
Hyepersonic Double Din Player
Hyundai Creta Double Din Player
Hyundai Xcent OEM Double Din Player
banzara
Prospectus Patrachar Vidyalaya
ReplyDeleteCBSE Forms
CBSE Patrachar Delhi
Patrachar Vidyalaya phone no.
packer and mover chandigarh
Packers and movers in panchkula
packers and movers in mohali
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 3313 exam questions
ReplyDeletePackers and Movers Pune Provide High Quality ***Household Shifting, Home/Office Relocation, Insurance, Packing, Loading, ###Car Transportation Service Pune and High experiences, Top Rated, Safe and Reliable, Best and Secure Packers and Movers Pune Team List. Get ✔✔✔ Affordable Rate Charts and Compare Quotation and Save Money and Time .
ReplyDeletePackers And Movers Pune
Hire Best Packers And Movers Mumbai for hassle-free Household Shifting, ***Office Relocation, ###Car Transporation, Loading Unloading, packing Unpacking at affordable ✔✔✔ Price Quotation. Top Rated, Safe and Secure Service Providers who can help you with 24x7 and make sure a Untroubled Relocation Services at Cheapest/Lowest Rate
ReplyDeletePackers And Movers Mumbai
Get Packers and Movers Jaipur List of Top Reliable, 100% Affordable, Verified and Secured Service Provider. Get Free ###Packers and Movers Jaipur Price Quotation instantly and Save Cost and Time. Packers and Movers Jaipur ✔✔✔Reviews and Compare Charges for household Shifting, Home/Office Relocation, ***Car Transportation, Pet Relocation, Bike SHifting @
ReplyDeletePackers And Movers Jaipur
Packers and Movers in Delhi -Air wares Packers and Movers could be a metropolis primarily based Packers Movers Company providing reliable and cost-efficient Packers Movers services, Packers and Movers in metropolis and Packing Moving services all told over Republic of India. it's branches all told the most cities of Republic of India. Packers and Movers in metropolis worth the emotions of our customers and thence take that any care, whereas moving and packaging the merchandise of our customers.
ReplyDeletePackers and Movers in Delhi - Air payload Packers and Movers may be a Ncr primarily based Packers Movers Company providing reliable and efficient Packers Movers services, Packers and Movers in Ncr and Packing Moving services all told over Asian nation. it's branches all told the most cities of Asian nation..
ReplyDelete