按照书中的例子,在context_PreSendRequestContent方法中填写如下代码: void context_PreSendRequestContent(object sender, EventArgs e)
{
string message = "<!--" + DateTime.Now.ToShortDateString() + "-->";
_current.Response.Write(message);
}
webconfig中添加如下代码 <httpModules>
<add name="AppendMessage" type="HttpModules.AppendMessage,HttpModules"/>
</httpModules>
效果应该是在运行的页面源代码中的最后添加出一行<!-- + DateTime.Now.ToShortDateString() + -->问题是在2005运行中可以出现,而在2008运行中就不会添加,请问是什么原因,该如何解决,谢谢!
{
string message = "<!--" + DateTime.Now.ToShortDateString() + "-->";
_current.Response.Write(message);
}
webconfig中添加如下代码 <httpModules>
<add name="AppendMessage" type="HttpModules.AppendMessage,HttpModules"/>
</httpModules>
效果应该是在运行的页面源代码中的最后添加出一行<!-- + DateTime.Now.ToShortDateString() + -->问题是在2005运行中可以出现,而在2008运行中就不会添加,请问是什么原因,该如何解决,谢谢!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货