ASP.NET 编译和部署
项目和网站的区别
项目编译成dll,网站通过“发布网站”来部署
部署目的地:/bin目录下
7个顶级目录及其编译情况
三种部署方式及其程序集生成情况 (程序集影子拷贝)
定制程序集生成:
<compilation>
<codeSubDirectories>
<add directoryName="vb_components"/>
<add directoryName="cs_components"/>
<add directoryName="wsdl-files"/>
<add directoryName="xsd-files"/>
</codeSubDirectories>
</compilation>
利用App_Code目录 部署自定义数据源类 的应用示例
数据源类:
namespace EssentialAspDotNet.Architecture
{
public static class MyDataSource
{
static string[] _items =
{"Item #1", "Item #2", "Item #3", "Item #4",
"Item #5", "Item #6", "Item #7", "Item #8",
"Item #9", "Item #10"};
public static string[] GetItems()
{
return _items;
}
}
}
前台页:
<body>
<form runat="server" id="_form">
<h1>Test ASP.NET 2.0 Page with declarative data binding</h1>
<asp:BulletedList runat="server" ID="_displayItems"
DataSourceID="_itemsDataSource">
<asp:ListItem>Sample item 1</asp:ListItem>
<asp:ListItem>Sample item 2 ...</asp:ListItem>
</asp:BulletedList>
<h2 runat="server" id="_messageH2">Total number of items = xx</h2>
<asp:ObjectDataSource runat="server" ID="_itemsDataSource"
TypeName="EssentialAspDotNet.Architecture.MyDataSource"
SelectMethod="GetItems" />
</form>
</body>
相关文档:
在ASP.NET 1.1中,要做1个弹出的确认对话框的话,一般是在服务端的代码中这样写:
private void Page_Load(object sender, System.EventArgs e)
{
btnClick.Attributes.Add("onclick", "return confirm('Are you sure?');");
// Button1.Attributes["OnClick"] = "return conf ......
一、用JQuery的Ajax加载XML并解析的注意事项
1、Content-Type
很多时候无法解析就是Content-Type的问题。如果本身就是XML文件,请跳过这一步。
动态生成的XML一定要将其设置为text/xml,否则默认就是text/html也就是普通的文本。 常见语言的Content-Type设置:
  ......
JSP同样是实现动态网页的一个利器。由于他的脚本语言是JAVA,所以继承了JAVA诸多优点。那么与ASP相比,应该可以说ASP和JSP基本不是一个档次上的。那么ASP.NET和JAVA却是可以抗衡的。
JSP和ASP相比较: 运行速度、运行开销、运行平台、扩展性、安全性、函数支持、厂商支持、对XML的支持等等,ASP都不是JSP的对手。COM ......
问题1:
“/dsfsd”应用程序中的服务器错误。
未将对象引用设置到对象的实例。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
异常详细信息: System.NullReferenceException: 未将对象引用设置到对象的实例。
源错误:
执 ......