[英]how to bind the string variable to a href of anchor tag in c#
我想將字符串變量filename
的值添加到 TC 之前的 href 中,例如:
href="TC/'" @filename"'" target="_blank" style="color:White;"> Download TC
// code behind
filename = dr["filename"].ToString();
<a href='@("TC/" + filename)' target="_blank" style="color:White;"> Download TC</a>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.