易截截图软件、单文件、免安装、纯绿色、仅160KB

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 用流的方式下载文件

//以下代码根据别人文章和自己整理
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
namespace WebApplication1
{
public partial class DownfFile : System.Web.UI.Page
{
p ......

asp.net成长日记

1、建立数据层 连接数据库->建立数据集*.xsd->表中建立查询方法
2、建立业务逻辑层 包装TableAdapter方法成类
3、建立母板页和站点导航( CSS待学习)
4、使用数据源展现数据 五种数据源 编辑数据源参数 使用tableadapter方法
5、使用dropDownList过滤主-从报表
     使用tableadapter方法 ......

ASP.NET弹出确认窗口

在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 ......

ASP.NET使用无Cookie的表单认证票据

ASP.NET
使用无Cookie的表单认证票据
默认情况下,forms authentication system将决定是将票据存储在cookies
collection里还是插入用户访问页面的URL里。所有主流的桌面浏览器,比如Internet
Explorer,Firefox,Opera,或Safari都支持cookies,但并非所有的移动设备都支持。
forms authentication system使用何种co ......

ASP.NET页面性能优化方案总结

1.使用Page.IsPostBack减少页面回发次数
2.避免使用服务器控件,如果用到服务器控件,有些控件不需要维护其状态,可以设置其属性: EnableViewState=false;
如果整个页面控件都不需要维持状态视图,则可以设置整个页面的状态视力为false:
         代码如下: <%@ Page Enable ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号