ASP.NET在VS2008中如何实现调试!~~~
第一种适用于没有建立虚拟路径的项目,而且项目也不大的情况下,直接打断点,之后点击F5运行。
第二种适用于建立虚拟路径的项目,打好断点,之后选择调试->附加到进程->选择aspnet_wp.exe,之后打开浏览器,打开页面,到有断点的地方会自动跟踪进去!~
注:有的操作系统可能找不到aspnet_wp.exe 可能存在ccc.exe之类的,可选择附加!
相关文档:
+++ 修改Global.asax文件:
<%@ Application Language="C#" %>
<script runat="server">
void Application_Start(object sender, EventArgs e)
{
Application["count"] = 0;
}
void Application_End(object sender, EventArgs e)
{ }
void Application_Error(object sender, EventArgs ......
+++ 修改WebConfig文件:
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="connStr" value="Data Source=ora11g;uid=scott;pwd=tiger;unicode=true"/>
</appSettings>
<connectionStrings>
<ad ......
第一步 掌握一门.NET面向对象语言,C#或VB.NET 我强烈反对在没系统学过一门面向对象(OO)语言的前提下去学ASP.NET。 ASP.NET是一个全面向对象的技术,不懂OO,那绝对学不下去!
第二步 对.NET Framework类库有一定的了解 可以通过开发Windows Form应用程序来学习.NET Framework。ASP.NET是建构在.NET Framework之上的 ......
如有页面Admin,则在其cs文件中写如下代码:
protected void Page_Load(object sender, EventArgs e)
{
Response.AddHeader("Cache-Control", "no-cache");
Response.Expires = -1;
Response.Cache.SetNoStore();
Response.AddHeader("Pragma", "no-cache");
Response ......