My codes are in "Item Template - asp:repeater element"
When i try print them to in my page (aspx) sometimes embed video player can not be displayed if image displayed already. I think it is happening cause of not closed tags (image and embed tags). How can i close the this elements in StringFormat. I'm newbie at programming and sorry for my bad English.
Here my codes:
<%#(String.IsNullOrEmpty(Eval("image").ToString()) ? "" : String.Format("<img class='img-thumbnail' style='margin-top:15px !important; margin-bottom:15px !important; width:300px; margin: 0 auto;' src='http://example.com/image/{0}'" , Eval("image").ToString()))%>
<%#(String.IsNullOrEmpty(Eval("embed").ToString()) ? "" : String.Format("<iframe style='margin-left: 20px;' width='300' height='169' src='https://www.youtube.com/embed/{0}'" , Eval("embed").ToString())) %>