ASP.NET中使用分类页步骤
第一步:创建对象
第二步:设置属性
①pdsBooks.AllowPaging=true;
②pdsBooks.PageSize=5;
③pdsBooks.CurrentPageIndex=CurrentPage-1;
④pdsBooks.DataSource=BookManage.GetAllBooks();
第三步:绑定数据源
DataList1.DataList=pdsBooks;
DataList1.DataBind();
相关文档:
ItemTemplate:项模版,标记了每行显示的内容
AlternatingItemTemplate:交替项模版,可设置交替行显示不同的风格,不设置时,与项模版相同
SelectedItemTemplate:选中模版,设置选中后的特殊样式
EditItemTemplate:编辑项模版
HeaderTemplate和FooterTemplate:页眉和页脚的模版
SeparatorTemplate:分隔符模版,一般用 ......
Row内找Label控件
//内部控件事件
protected void LinkButton11_Click1(object sender, EventArgs e)
{
//删除对应的事务
int ......
1. 打开新的窗口并传送参数: //传送参数:
response.write("<script>window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="++"’)</script>")
//接收参数:
string a = Request.QueryString("id");
string b = Request.QueryString("id1");
2.为按钮添加对话框
Button1 ......
2.4 导航条设计方案
一个Web站点,尤其是信息量大的大中型Web站点,应为用户提供站点导航。站点导航是每个网站必不可少的,它相当于城市公路的路标。通过导航条设计方案,可以使网站浏览者找到自己想要的内容。
2.4.1 树型导航条设计方案
树型导航条设计主要应用TreeView控件,TreeView控件对数据有着良好的支持,通过显 ......
<connectionStrings>
<add name="qxConnectionString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Web/App_Data/db2.mdb;" providerName="System.Data.OleDb"/>
</connectionStrings> ......