Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
47
Reply
avoid the duplicate,only once need to display in mvc
vidhya
Jul 31 2013 8:37 AM
6.3k
Reply
I need to display the testname, if the testname repeats i need not to avoid it?
i used like this but duplicate is displaying.
@{
var tname="null" ;
}
@foreach (StudentGradeBook x in Model.Student)
{
if(!(tname.Equals(@x.TestName)))
{
<th>@x.TestName</th>
}
tname = @x.TestName.ToString();
}
If x contains
test
test
test
testing
testing
But i need to display
test
testing
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
47
)
Next Recommended Forum
list of tools(open source) of code review in asp.net
session application difference in asp.net ?