0
리피터 내 데이터 바인딩 내부 문 만약 내가 삼항을 수행하기 위해 노력하고 바인딩 경우 :데이터 내부의 문은 중계기
<%# If(Container.DataItem.rDate.isEmpty, String.Empty, Format(Container.DataItem.rDate.Date, "Short Date"))%>
이에 상응해야한다 : 그러나
If rDate.isEmpty then
String.Empty
Else
String.Format(rDate, "Short Date")
End If
, I 런타임에 컴파일 오류가 발생합니다. 예상 표현식은
<%# If(Container.DataItem.rDate.isEmpty, String.Empty, Format(Container.DataItem.rDate.Date, "Short Date"))%>
여기에 무슨 문제가 있습니까?
중복 가능성 [VB.NET에 조건 삼항 연산자가 있습니까? (http://stackoverflow.com/questions/576431/is-there-a-conditional-ternary-operator-in-vb-net) –
@IlyaBursov 삼항 연산자가 있음을 알고 있습니다. 내 질문과 관련이 있습니다. 이유는 무엇입니까? 내 데이터 바인딩에 오류가 발생했습니다. – Popo
VB.NET 2008을 사용합니까? '아마도 Container.DataItem.rDate.isEmpty = TRUE'가 도움이 될 것입니다. –