您的位置:首页 >> Web开发 >> ASP.NET >> ASP.Net应用 >> 正文
ASP.Net应用 RSS
 

ASP.NET结合存储过程写的通用搜索分页程序

http://www.rdxx.com 06年10月25日 16:05 互联网 我要投稿


<%@ Page Language="C#" %>
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Data.SqlClient" %>
<script runat="server">

    protected void Page_Load(Object sender, EventArgs e)
         {
             int intPageNo,intPageSize,intPageCount;
             intPageSize = 25;
             if (Request["CurrentPage"]==null) 
                 {
                     intPageNo = 1;
                 }
             else
                 {
                     intPageNo = Int32.Parse(Request["CurrentPage"]);
                 }
             
             
             SqlConnection mySqlConnection = new SqlConnection("server=(local);Database=test;user id=sa;password="
             SqlCommand mySqlCommand = new SqlCommand("up_GetTopicList", mySqlConnection);
             mySqlCommand.CommandType = CommandType.StoredProcedure;
             
             SqlParameter workParm;
             
             //搜索表字段,以","号分隔
             workParm = mySqlCommand.Parameters.Add("@a_TableList", SqlDbType.VarChar, 200);
             mySqlCommand.Parameters["@a_TableList"].Value = "OFFERID,type,offertime";
             

共9页  第1页 第2页 第3页 第4页 第5页 第6页 第7页 第8页 第9页


 
 
标签: 通用 , 分页程序 , 搜索 , ASP.NET , 存储过程 , .NET , 程序 , 存储 , ASP , 分页 打印本文
 
 
  热点搜索
 
 
 



Valid XHTML 1.0 Transitional
Copyright ©2005 - 2008 Rdxx.Com,All Rights Reserved
收藏本页
收藏本站