public static string Left(this String param, int length)
{
string result = param.Substring(param.Length – length, length);
return result;
}
then you can use it in view as
<% Model.city.Left(10) %>
Software development, cloud and practical coding notes
This was lovely, thanks for sharing
Post a Comment