[英]how to bind the string variable to a href of anchor tag in c#
I want to add the value of string variable filename
to href ahead of TC like:我想将字符串变量
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.