The Razor parser is picky, and in some cases it doesn't correctly parse or color-code the syntax. Your code will work.
To fix the issue, you can format the code in a way that the parser will know exactly how to figure this out. Use parentheses around all Razor server-side code references:
<input type="button" id="btntest" value="Details"
onclick="ABC('@(Item.TourApplicationID)', '@(Item.TourID)')" />
Edit: above may have only been working in VS 2013, with or without an update. (or not at all- I just remember it working.
Below should work, taken from MVC3 unterminated string constant syntax error:
<input type="button" id="btntest" value="Details"
onclick="@("ABC('" & Item.TourApplicationID & "', '" & Item.TourID & "')")" />
(I think that's correct. Hard to tell without the color-coding.)
I prefer string.format, so that onclick would look more like:
onclick="@(String.Format("ABC('{0}', '{1}')", Item.TourApplicationID, Item.TourID) )"