TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Singaravel Vela
NA
120
13.7k
Expected a "{" but found a "<". Block statements must be
Nov 15 2018 5:45 AM
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>
Reply
Answers (
1
)
db.employee.tolist() am getting list but
Regarding Mapping