Hi,
I am getting the error while i am call the Partial View.
Expected a "{" but found a "<". Block statements must be enclosed in "{" and "}". You cannot use single-statement control-flow statements in CSHTML pages.
my partial view Code is
- <table cellpadding="0" cellspacing="0" id="SearchResultTable" class="table table-striped table-bordered nowrap" style="width:100%">
- <thead>
- <tr>
- @foreach (var col in Model.Columns)
- {
- if (jsonString != string.Empty)
- {
- jsonString = jsonString + "$$$";
- }
- jsonString = jsonString + col.Name;
- <th>@col.DisplayName</th>
- }
-
- @if (Model.IsEdit)
- <th>Edit</th>
-
- @if (Model.IsDelete)
- <th>Delete</th>
-
- @if (Model.IsView)
- <th>View</th>
-
-
- @if (Model.IsPrint)
- <th>Print</th>
-
- </tr>
- </thead>
- </table>