hi guys i am new to mvc and i am working on one project...where in my view i need to get a substring of a string in @html.DisplayFor(modelItem=> item.resumelink).
i tried couple of things like
<span>
@Html.LabelFor(modelItem => item.ResumeLink,new {text=item.ResumeLink.Contains("#") ? item.ResumeLink.Substring(0, item.ResumeLink.IndexOf("#")) : item.ResumeLink })
</span>
but it is not working.
i am trying to create display template but i dont know how to get the last index of a file till where i want to crop my string...any help would be appreciated..thnks