0

我创建了一个简单的 WebResouce 来获取图像 url,但它不起作用?有什么问题?

下载链接我的样本:http ://www.mediafire.com/?7sah76ww4c8915m

  //in AssemblyInfo.cs
[assembly: System.Web.UI.WebResource("WebApplication4.Test.gif", "image/gif")]

    protected void Page_Load(object sender, EventArgs e)
    {

     string d=   this.ClientScript.GetWebResourceUrl(this.GetType(),
                                                 "WebApplication4.Test.gif");
     Image i = new Image();
     i.ImageUrl = d;
     Controls.Add(i);

    }
4

0 回答 0