0
這裏有什麼可能成爲問題嗎?我試圖得到一個文檔類型,沒有期間。Kentico Eval('DocumentType')
<script runat="server">
// we need to remove the . from the DocumentType
public string dt;
protected override void OnDataBinding(EventArgs e){
dt = Eval("DocumentType").ToString();
dt = dt.TrimStart('.');
}
</script>
<li>
<p class='title'><a href='<%# GetDocumentUrl() %>' target='_blank' class='type-<%# dt %>' data-name='<%# Eval("FileName") %>'><%# Eval("FileName") %></a></p>
<p class='description'><%# Eval("FileDescription") %></p>
<a href='<%# GetDocumentUrl() %>' target='_blank' class='btn btn-chevron type-<%# dt %>' data-name='<%# Eval("FileName") %>'>Download</a>
</li>
謝謝! dotNet不是我的強項:) –