我正在尝试应用图片名称,但图片未加载。
if (!IsPostBack)
{
string[] str = new string[] { "Select","Anniversary","Birthday","Graduation","Sympathy" };
for (int i = 0; i < str.Length; i++)
{
DDl1.Items.Add(str[i]);
} // this Loop creates the items in the drop down list
{
string str = DDl1.Text;
Image1.ImageUrl="~/Media"+str+".png";
} // This is how i was trying to call the images from the Media folder in my project