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
Guest User
Tech Writer
611
127.9k
Read or Less more in mvc.
Oct 24 2020 5:31 AM
how to implement read more and less functionality for dynamic string inside foreach block in mvc.
@foreach (var item in ViewBag.Texts)
{
<div>
<span class="LongString">@item </span>
<button class="ReadLess">Read Less</button>
</div>
}
public ActionResult ReadMore()
{
List<string> lists = new List<string>() {"abababababa","abababjdvdhg","hfjhdsfqwtw8yqfjref","jegiuigwerhti"};
ViewBag.Texts = lists;
return View();
}
Reply
Answers (
1
)
Download excel file using href.
How to fetch kendo dropdowndownlist selected text ?