how to implement read more and less functionality for dynamic string inside foreach block in mvc.
@foreach (var item in ViewBag.Texts)
{
@item
}
public ActionResult ReadMore()
{
List lists = new List() {"abababababa","abababjdvdhg","hfjhdsfqwtw8yqfjref","jegiuigwerhti"};
ViewBag.Texts = lists;
return View();
}
Sachin SinghPosted Oct 24, 2020, 5:37 AM