在 .ascx 页面中,我有如下图像按钮:
"<asp:Image ID="imgPhotos" runat="server" Width="102" Height="82"/>"
在其背后的代码中,我有:
this.imgPhotos.ImageUrl = "~/lib/services/GetSpaceImage.ashx";
在 GetSpaceImage.ashx 中,我正在动态生成图像。但问题是,它第一次运作良好。但是,第二次等等它永远不会生成新图像。调试器仅在第一次(应用程序加载时)命中处理程序。我试过使用:“context.Response.Cache.SetCacheability(HttpCacheability.NoCache);”
在 ProcessRequest 的开头。但这也无济于事。我错过了什么吗?请指教