Beef Brisket News Release system video look nearly half a month time, today successfully released it, haha. The first time to see the teaching video so focused, do not take away thinking, very good. To the calf teacher praise One, hey!
At the end of each study, the most important thing is to summarize, so let me in reverse form, particles it!
- The release of Beef Brisket Press release system
Reference blog:
Installation and configuration of IIS under Win7
Http://www.jb51.net/article/29787.htm
VS2010 Website Release detailed
http://wanghaitaoboke.blog.163.com/blog/static/1708725122012527716235/
Handler "pagehandlerfactory-integrated" has an error module "Managedpipelinehandler" in its module list
http://blog.csdn.net/mazhaojuan/article/details/7660657
- The production of pagination
Stored procedures:
--============================================= --Author:xuchenyang --Create Date: 2014-9-3 22:31:21 --Description: Paging Stored Procedure- -============================================= Create PROCEDURE [dbo].[ News_selectbypage] @startIndex int, @endIndex int as BEGIN with Temptbl as ( SELECT ROW _number () over (ORDER by id desc) as row,* from news ) SELECT * from Temptbl where Row between @startIndex and @e Ndindex END
DAL:
#region Select Paging Records public DataTable selectnewsbypage (String startIndex, String endIndex) { DataTable dt=new DataTable (); String cmdtext = "News_selectbypage"; Sqlparameter[] paras = new sqlparameter[] {new SqlParameter ("@startIndex", StartIndex), new SqlParameter ("@ EndIndex ", EndIndex)}; DT = SqlHelper. Excutequery (Cmdtext, paras, commandtype.storedprocedure); return dt; } #endregion
Bll:
#region Paging Select Record public DataTable selectnewsbypage (String startIndex, String endIndex) { return Ndao. Selectnewsbypage (Startindex,endindex); } #endregion
Web:
Open admin/newsmanager.aspx:
Toolbox blank Right click--"Select item"--Browse--Find the downloaded aspnetpager.dll--dragged onto the page
<div> <webdiyer:aspnetpager id= "ANP" runat= "Server" onpagechanged= "anp_pagechanged" pagesize= "5" CssClass = "ANP" > </webdiyer:AspNetPager> </div>
protected void Page_Load (object sender, EventArgs e) {//Determine if the Session contains an admin if (session["admin"]! = null && session["admin"]. ToString () = = "Niunan") {//Signed in if (! Page.IsPostBack) {//Set the total number of record bars for the paging control (total number of records/number of records per page pagesize= pages) ANP. RecordCount = new Newsmanager (). SelectAll (). Rows.Count; Binding news Bindnews (); }} else {//not logged in Response.Redirect ("Login.aspx"); }} #region bound news list private void Bindnews () {//based on the ordinal of the starting and ending records of the current page, select the news from the database and bind to the control REPNEWS.D Atasource = new Newsmanager (). Selectnewsbypage (ANP). Startrecordindex.tostring (), ANP. Endrecordindex.tostring ()); Repnews.databind (); } #endregion protected void Anp_pagechanged (object sender, EventArgs e) {//response.write ("Number of start records:" + ANP. Startrecordindex + "<br> end of record" + anP.endrecordindex); Updates the bound news Bindnews () when the current page is toggled; }
CSS style:
. ANP { padding-left:200px;}
:
The above content is very basic, but the important is unceasingly accumulates, attempts and explores!
Beef Brisket News Release System summary--site publishing and paging production