f10でコードをデバッグすると、エラーなしで動作します!。しかし、実行時に、「同じキーを持つアイテムがすでに追加されています」というエラーが発生しました。
Plzヘルプ
私の辞書:
public static Dictionary<string, string> ImageFilePath
= new Dictionary<string, string>();
同じGlob.csで私の関数を使用する:
public static Image ShowImageOnColumn(string Value,byte ImageHeigth,byte ImageWidth)
{
.
.
.
string FilePath = "",ImgId = "";
Image img_ = new Image();
Random rnd = new Random();
ImgId = rnd.Next(100000000).ToString();
img_.ImageUrl = "ShowImageInRuntime.aspx?FileName=" + ImgId;
ImageFilePath.Add(ImgId, FilePath);
img_.Height = Unit.Pixel(ImageHeigth);
img_.Width = Unit.Pixel(ImageWidth);
return img_;
}