I am getting compilation error in the code below, it complaining about a bracket but all the bracket and matching up I am a bit lost can someone please help me here thank in advance.
Error:
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1513: } expected
@using System.Linq
@using System
@using System.Text
@using System.Collections;
@model List<PairingTest.Web.Models.QuestionnaireViewModel>
<html>
<head>
<title></title>
</head>
<body>
@using (Html.BeginForm("GetMarks","Questionnaire")) {
for(int i = 0;i < Model.Count;i++) {
<text> @Model[i].QuestionAsk </text> <br />
var s = @Model[i].PossibleAnswer;
string[] exAns = s.Split(',');
foreach( var singleAns in exAns){
<text>singleAns</text> <br />
@Html.RadioButtonFor(M =>M[i].UserAnsResponse, singleAns); <br />
}
<br />
}
<input type="submit" name="submit" />
}
</body>
<br/>is an issue as Razor will recognize these as HTML tags: dotnetfiddle.net/JVNiVu - AaronLSifcondition? That's not shown in the code you posted, so hard to say. There's lots of little ways to get tripped up on Razor syntax. Depending on where it is, you may have a@where it is or is not required, or mismatch braces on theif. - AaronLS