簡體   English   中英

如何將字符串變量綁定到 c# 中的錨標記的 href

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM