如何用ASP代码实现网页中新闻图片的轮放 请教各位高手,如何用ASP代码实现网页中新闻图片的轮放,就像新华网中的新闻一样,右下角有有1、2、3、4、5、6等按钮,点击并能打开一个新的连接,请大家给帮帮忙啊,最好有源码 ,谢谢了~~~~~~~~~~~~~~~~~~ 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 http://topic.csdn.net/u/20100518/17/31279069-bff8-48d3-b91f-6a554045c31d.html 到底是ASP。还是ASP.NET啊?ASP.NET版:aspx页:<script language="javascript" type="text/javascript"> var swf_width = 300; var swf_height = 240; var swf_path = ''; var files = ''; var texts = ''; var links = ''; files += '<%=S_Pic%>'; texts += '<%=S_Title%>'; links += '<%=S_Link%>'; document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="' + swf_width + '" height="' + swf_height + '">'); document.write('<param name="movie" value="' + swf_path + 'images/bcastr31.swf"><param name="quality" value="high">'); document.write('<param name="menu" value="false"><param name="wmode" value="opaque">'); document.write('<param name="FlashVars" value="bcastr_file=' + files + '&bcastr_link=' + links + '&bcastr_title=' + texts + '&TitleBgColor=6699FF">'); document.write('<embed src="' + swf_path + 'images/bcastr31.swf" wmode="opaque" FlashVars="bcastr_file=' + files + '&bcastr_link=' + links + '&bcastr_title=' + texts + '&TitleBgColor=6699FF&" menu="false" quality="high" width="' + swf_width + '" height="' + swf_height + '" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'); document.write('</object>'); </script>cs页: public string strPageTitle;//页面标题 public string S_Pic;//幻灯片图片 public string S_Title;//幻灯片标题 public string S_Link;//幻灯片连接 ClassDB DB = new ClassDB(); protected void Page_Load(object sender, EventArgs e) { strPageTitle = "ASP.NET幻灯片"; oViewFlash(); } /// <summary> /// Flash幻灯片 /// </summary> private void oViewFlash() { string oFlashPic = ""; string oFlashLink = ""; string oFlashTitle = ""; SqlConnection myConn = DB.GetConnection(); string strSql = "Select Top 8 ID,PicName,PicLink,PicImg From Pic Order By Id Desc"; SqlCommand oIsCmd = new SqlCommand(strSql, myConn); myConn.Open(); SqlDataReader sdr = oIsCmd.ExecuteReader();//查询,很明显可以看到 返回的是 SqlDataReader对象 while (sdr.Read())//使用SqlDataReader的 sdr.Read()方法读出数据 { oFlashPic += sdr["PicImg"].ToString() + "|"; oFlashLink += sdr["PicLink"].ToString() + "|"; oFlashTitle += sdr["PicName"].ToString() + "|"; S_Pic = oFlashPic.Substring(0, oFlashPic.LastIndexOf("|")); S_Title = oFlashTitle.Substring(0, oFlashTitle.LastIndexOf("|")); S_Link = oFlashLink.Substring(0, oFlashLink.LastIndexOf("|")); } sdr.Close(); myConn.Close(); }asp版下载地址:http://www.aspprogram.cn/html/soft/2010610213050.html这个下载很奇怪。要使用IE默认方式下载。 请教asp.net程序在本地和在Hosting服务器上有什么区别吗? js加密过的数据如何传到后台 一个正则问题 repeater里嵌套LinkButton 如何添加事件代码 再贴!谁来拯救一下这个问题,向数据库添加记录 AccessDataSource的问题 求比较好看的datagrid层叠样式表~~~ 请做过文件上传功能的朋友看看,急。。。? 求一数值正则表达式(如:¥12 或¥12,345 或¥3,456,789) △△△为什么总是取不到菜单? 总是显示catch里面的内容???△△△ Asp.net 默认的错误页面是如何生成的? 关于自动执行
aspx页:
<script language="javascript" type="text/javascript">
var swf_width = 300;
var swf_height = 240;
var swf_path = '';
var files = '';
var texts = '';
var links = '';
files += '<%=S_Pic%>';
texts += '<%=S_Title%>';
links += '<%=S_Link%>';
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="' + swf_width + '" height="' + swf_height + '">');
document.write('<param name="movie" value="' + swf_path + 'images/bcastr31.swf"><param name="quality" value="high">');
document.write('<param name="menu" value="false"><param name="wmode" value="opaque">');
document.write('<param name="FlashVars" value="bcastr_file=' + files + '&bcastr_link=' + links + '&bcastr_title=' + texts + '&TitleBgColor=6699FF">');
document.write('<embed src="' + swf_path + 'images/bcastr31.swf" wmode="opaque" FlashVars="bcastr_file=' + files + '&bcastr_link=' + links + '&bcastr_title=' + texts + '&TitleBgColor=6699FF&" menu="false" quality="high" width="' + swf_width + '" height="' + swf_height + '" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write('</object>');
</script>
cs页:
public string strPageTitle;//页面标题
public string S_Pic;//幻灯片图片
public string S_Title;//幻灯片标题
public string S_Link;//幻灯片连接
ClassDB DB = new ClassDB();
protected void Page_Load(object sender, EventArgs e)
{
strPageTitle = "ASP.NET幻灯片";
oViewFlash();
}
/// <summary>
/// Flash幻灯片
/// </summary>
private void oViewFlash()
{
string oFlashPic = "";
string oFlashLink = "";
string oFlashTitle = "";
SqlConnection myConn = DB.GetConnection();
string strSql = "Select Top 8 ID,PicName,PicLink,PicImg From Pic Order By Id Desc";
SqlCommand oIsCmd = new SqlCommand(strSql, myConn);
myConn.Open();
SqlDataReader sdr = oIsCmd.ExecuteReader();//查询,很明显可以看到 返回的是 SqlDataReader对象
while (sdr.Read())//使用SqlDataReader的 sdr.Read()方法读出数据
{
oFlashPic += sdr["PicImg"].ToString() + "|";
oFlashLink += sdr["PicLink"].ToString() + "|";
oFlashTitle += sdr["PicName"].ToString() + "|";
S_Pic = oFlashPic.Substring(0, oFlashPic.LastIndexOf("|"));
S_Title = oFlashTitle.Substring(0, oFlashTitle.LastIndexOf("|"));
S_Link = oFlashLink.Substring(0, oFlashLink.LastIndexOf("|"));
}
sdr.Close();
myConn.Close();
}asp版下载地址:
http://www.aspprogram.cn/html/soft/2010610213050.html
这个下载很奇怪。要使用IE默认方式下载。