깨진 주소를 사용하고 서식을 지정하는 HTML 도우미가 있지만 실제 <br />
태그 대신 내 웹 페이지에서 줄 바꿈. 내가이 일을하는 원인이 무엇입니까?줄 바꿈 태그가 사용자 지정 HTML 도우미의 텍스트로 표시되는 이유 asp.net mvc
여기 내 도우미 메서드
public static HtmlFormatAddress(this helper, string number
, string fraction
, string direction
, string street
, string type
....)
{
var sb = new StringBuilder();
if (!string.IsNullOrEmpty(number))
sb.Append(number.Trim() + " ");
if (!string.IsNullOrEmpty(fraction))
sb.Append(fraction.Trim() + " ");
if (!string.IsNullOrEmpty(direction))
sb.Append(direction.Trim() + " ");
if (!string.IsNullOrEmpty(street))
sb.Append(street + " ");
if (!string.IsNullOrEmpty(type))
if (sb.Length > 0)
sb.Append("<br />");
.....
return sb.ToString();
}
감사합니다 앤드류. 그거였다. – zSynopsis
당신은 환영합니다 :) –