I am outputting data to a table like the following:
foreach (var attr in item.attr_type)
{
<td>
@foreach (var attrs in attr.attr_value)
{
@attrs
}
</td>
}
If there a trim function i can put around @attrs because alot of white space is created
Not sure what type attrs
is, but:
@foreach (var attrs in attr.attr_value)
{
@(attrs.ToString().Trim())//should work?
}
If it doesn't, you can/should, override toString()
in your attrs type.
Note: @(..)
does output an HTML-encoded string.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With