使用string.format显示图像 [英] Display image using string.format
本文介绍了使用string.format显示图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好我正在尝试使用后面的代码向页面显示图像,但它无法正常工作:
这是我正在使用的代码:
Hi I am trying to display an image to a page using a code behind but it is not working:
this is the code I am using :
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string OrderReport = string.Format("<img width=\"50\" alt=\"{0}\" scr=\"{1}\"/>", Resources.Language.NoPreview, "../Logo/GeLogo.png");
//OrderReport += string.Format("<img width=\"35\" alt=\"{0}\" src=\"\" />");
OrderInvoice.Text += OrderReport;
}
}
推荐答案
格式字符串中拼写错误的src。
You misspelled "src" in the format string.
这篇关于使用string.format显示图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文