All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
XML入门教程-服务器上的XML_[XML教程]
突破Windows,2003,PHP服务器的新思路_php资料_编程技术
PHP代码:基本数据结构和php内置函数_php资料_编程技术
SQL Server 2005 Reporting Services 报表中随意格式化日期的方法_[SQL Server教程]
PHP5 OOP编程中的代理与异常定制_[PHP教程]
网页制作应掌握技术:随心所欲定制页面"弹出窗口"_JavaScript技术_编程技术
PHP程序指定目录里的指定后缀名文件为超连接_[PHP教程]
asp.net2.0服务器控件之RadioButton控件
C#网络应用编程基础练习题与答案(三)_[Asp.Net教程]
在Windows中安装Apache2和PHP4的权威指南_[PHP教程]
Reading number is top 10 pictures
为什么别人说你是疯子
中国的十元人民币的秘密
The money of more than 100 countries and regions17
如果我是导演...
The hot big eye big breast beauty2
The hot big eye big breast beauty1
毛俊杰-能量永动机
yy365网站上的美女1
So beauty, will let you spray blood2
a pure sister
Download software ranking
c#程序设计案例教程
matrix1
Unix video tutorial7
C#COM编程指南
matrix2
The Bermuda triangle2
电车之狼R
艳兽都市
Popkart Cracked versions Mobile phone games
电脑知识及技巧大合集
aaa published in(发表于) 2013/12/6 10:16:49 Edit(编辑)
Ajax无刷新实现图片切换特效_.net资料_编程技术

Ajax无刷新实现图片切换特效_.net资料_编程技术-数科优化网

Ajax无刷新实现图片切换特效_.net资料_编程技术-数科优化网







一、AjaxMethod
using System;
using System.Data;
using System.Data.SqlClient;




namespace AjaxImage
{
/**////


/// AjaxMethod 的摘要说明。
///

public class AjaxMethod
{
public AjaxMethod()
{
}
public static string ConnectionString = System.Configuration.ConfigurationSettings.AppSettings["ConnectionString"].ToString();




GetDataSet#region GetDataSet
public static DataSet GetDataSet(string sql)
{
SqlDataAdapter sda = new SqlDataAdapter(sql, ConnectionString);
DataSet ds = new DataSet();
sda.Fill(ds);
if (ds != null)
return ds;
else
return null;
}
#endregion




[AjaxPro.AjaxMethod]
public static DataSet GetPhotoList( int iCategoryID )
{
string sql = "Select id,photo_path FROM Photo where photo_category_id=" + iCategoryID ;
return GetDataSet( sql );
}
[AjaxPro.AjaxMethod]
public static DataSet GetPhotoInfo( int id )
{
string sql = string.Format("SELECT photo_title, photo_description FROM Photo WHERE id = {0}", id);
return GetDataSet( sql );
}




}//end class
}




二、页面HTML代码:










onmouseout="this.src='images/play_bw.gif'"> onmouseout="this.src='images/pause_bw.gif'"> onmouseout="this.src='images/prev_bw.gif'"> onmouseout="this.src='images/next_bw.gif'">



三、javascript:

四、在主页面的ONLOAD事件里面添加:




onload="PreloadImage('2')"




五、WebConfig添加:










六、数据库脚本:
CREATE TABLE [Photo] (
[id] [int] IDENTITY (1, 1) NOT NULL ,
[photo_title] [varchar] (128) COLLATE Chinese_PRC_CI_AS NULL ,
[photo_description] [text] COLLATE Chinese_PRC_CI_AS NULL ,
[photo_category_id] [int] NULL ,
[photo_path] [varchar] (255) COLLATE Chinese_PRC_CI_AS NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO



























添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.