单项选择题

你为一家公司的采购部门做了一个ASP.NET应用程序。应用程序中的一个页面用来显示供应商的产品清单,产品的种类或价格,页面的URL以这个信息做参数。你想把ASP.NET页面基于这个参数的值在缓存区中保存多个版本,希望每个版本都缓存300秒,你需要添加代码来达到这个目标,你需要用哪个代码段?()

A.ResponsCachSetExpires(DateTimNow.AddSeconds(300))ResponsCachVaryByParams("?")=true
B.ResponsCachSetExpires(DateTimNow.AddSeconds(300))ResponsCachVaryByParams("All")=true
C.ResponsCachSetCacheability(HttpCacheability.Public)ResponsCachSetLastModified(DateTimParse("00:05:00"))ResponsCachVaryByParams("All")=true
D.ResponsCachSetCacheability(HttpCacheability.PublicResponsCachSetExpires(DateTimNow.AddSeconds(300))ResponsCachVaryByParams("*")=true

相关考题