ASP.NET緩存圖像從問題目錄C(如何禁用它?) .IE瀏覽器加載舊形象:\的Documents and Settings \本地設置\ Temporary Internet Files文件如何禁用單個圖像(單個頁面)上的緩存?
protected void Page_Load(object sender, EventArgs e)
{
MembershipUser user = Membership.GetUser();
imCropped.ImageUrl = (File.Exists(Server.MapPath("..") + @"\Users\" + user.ProviderUserKey.ToString() + @"\" + user.ProviderUserKey.ToString() + ".gif"))? "~/Users/" + user.ProviderUserKey.ToString() + "/" + user.ProviderUserKey.ToString() + ".gif" : "~/Images/thumb.gif";
}
protected void ButtonJcrop_Click(object sender, EventArgs e)
{
...
String mapPath = @"\Users\" + user.ProviderUserKey.ToString() + @"\" + user.ProviderUserKey.ToString() + ".gif";
bmpCropped.Save(Server.MapPath("..") + mapPath);
imCropped.ImageUrl = Request.ApplicationPath + mapPath;
...
}
請重新說明問題。 – hofnarwillie 2012-04-09 07:26:01
句子讓用戶更容易理解問題,謝謝。 – 2012-04-09 07:48:37