网站首页Flash新闻图片!!!!!! 用DATALIST做绑定。模板用个TABLE限定格式,上行放图片src=你要绑定的图片地址,下行放个LABLE,TEXT=你要绑定的新闻标题。两个控件各用<a href=绑定你要链接的地址>标签嵌套 另:你的结贴率怎么是零?恐怖份子? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 呵呵 用datalist 和 repeater 都可以 自己布局 然后分别用超链或者linkbutton 连接就可以了 只要你指定到对应的地址就可以了;假如你是从数据库中 取数据的话 那你就直接绑定就可以了比如:<a herf=‘<%# Eval("title")%>’>标题</a> 如果从数据库中取数据可以用From View绑定SQL数据源进行显示``也可以直接绑定就可以了: <a herf=‘ <%# Eval("title")%>’>标题 </a> public static string GetFlashNews(List<FlashNewsInfo> flashNewsList, int focuswWidth, int focusHeight,int textHeight) { StringBuilder text = new StringBuilder(2048); int count=flashNewsList.Count; text.Append("<a target=\"_self\" href=\"javascript:goUrl()\">\n"); text.Append("<script type=\"text/javascript\">\n"); if (flashNewsList != null && flashNewsList.Count > 1)//有flash新闻信息 { StringBuilder links = new StringBuilder(1024);//链接地址 StringBuilder urls = new StringBuilder(1024);//图片url StringBuilder texts = new StringBuilder(1024);//标题文字 links.AppendFormat("escape(\"NewsRead.aspx?CatalogId={0}&refId={1}\")", flashNewsList[0].CatalogId, flashNewsList[0].NewsId); urls.Append(flashNewsList[0].ImageUrl); texts.Append(flashNewsList[0].Subject); for (int i = 1; i < flashNewsList.Count; i++) { links.AppendFormat("+\"|\"+escape(\"NewsRead.aspx?CatalogId={0}&refId={1}\")", flashNewsList[i].CatalogId, flashNewsList[i].NewsId); urls.Append("|" + flashNewsList[i].ImageUrl); texts.Append("|" + flashNewsList[i].Subject); } text.Append("var focus_width=" + focuswWidth + ";\n"); text.Append("var focus_height="+focusHeight+";\n"); text.Append("var text_height="+textHeight+";\n"); text.Append("var swf_height = focus_height+text_height;\n"); text.Append("var pics=\"" + urls.ToString() + "\";\n"); text.Append("var links=" + links.ToString() + ";\n"); text.Append("var texts=\"" + texts.ToString() + "\";\n"); text.Append("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=\"'+ focus_width +'\" height=\"'+ swf_height +'\">');\n"); text.Append("document.write('<param name=\"allowScriptAccess\" value=\"sameDomain\"><param name=\"movie\" value=\"focus.swf\"><param name=\"quality\" value=\"high\"><param name=\"bgcolor\" value=\"#ffffff\">');\n"); text.Append("document.write('<param name=\"menu\" value=\"false\"><param name=wmode value=\"opaque\">');\n"); text.Append("document.write('<param name=\"FlashVars\" value=\"pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'\">');\n"); text.Append("document.write('<embed src=\"pixviewer.swf\" wmode=\"opaque\" FlashVars=\"pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'\" menu=\"false\" bgcolor=\"#F0F0F0\" quality=\"high\" width=\"'+ focus_width +'\" height=\"'+ focus_height +'\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />');\n"); text.Append("document.write('</object>');\n"); text.Append("</script>\n</a>"); } else//没有flash新闻信息 { text.Append("</script>\n</a>"); } return text.ToString(); } 需要链接标题,链接图片,flash的高度和宽度及连接URL地址等参数,你把数据从数据库取出来之后封装一下,其它的就和我上面的代码差不多了。最好你对js代码熟悉一点。做asp.net不可能一点不懂js的。 一个JS正则表达式的写法 急、在线等待、使用FileUpload上传如何判断上传的文件已经存在? 下面就是添加js后,出现了以前的东东不能用了 求教各位:我在使用 ReportViewer 控件,在设置报表为本地报表后,在运行时,出现错误. 求一个-js函数 #############用户登录的问题############## 火狐下javascript不能执行 返回dataset一列怎么样写,谢谢 怎么判断一个文本框输入的内容是我想要的 如何使链接的图片四周不出现边框 技术交流 想随时随地学习,交流的人 请进 asp.net网页显示word文档
用datalist 和 repeater 都可以 自己布局 然后分别用超链或者linkbutton 连接就可以了 只要你指定到对应的地址就可以了;
假如你是从数据库中 取数据的话 那你就直接绑定就可以了比如:<a herf=‘<%# Eval("title")%>’>标题</a>
也可以直接绑定就可以了: <a herf=‘ <%# Eval("title")%>’>标题 </a>
public static string GetFlashNews(List<FlashNewsInfo> flashNewsList, int focuswWidth, int focusHeight,int textHeight)
{
StringBuilder text = new StringBuilder(2048);
int count=flashNewsList.Count;
text.Append("<a target=\"_self\" href=\"javascript:goUrl()\">\n");
text.Append("<script type=\"text/javascript\">\n");
if (flashNewsList != null && flashNewsList.Count > 1)//有flash新闻信息
{
StringBuilder links = new StringBuilder(1024);//链接地址
StringBuilder urls = new StringBuilder(1024);//图片url
StringBuilder texts = new StringBuilder(1024);//标题文字
links.AppendFormat("escape(\"NewsRead.aspx?CatalogId={0}&refId={1}\")", flashNewsList[0].CatalogId, flashNewsList[0].NewsId);
urls.Append(flashNewsList[0].ImageUrl);
texts.Append(flashNewsList[0].Subject);
for (int i = 1; i < flashNewsList.Count; i++)
{
links.AppendFormat("+\"|\"+escape(\"NewsRead.aspx?CatalogId={0}&refId={1}\")", flashNewsList[i].CatalogId, flashNewsList[i].NewsId);
urls.Append("|" + flashNewsList[i].ImageUrl);
texts.Append("|" + flashNewsList[i].Subject);
}
text.Append("var focus_width=" + focuswWidth + ";\n");
text.Append("var focus_height="+focusHeight+";\n");
text.Append("var text_height="+textHeight+";\n");
text.Append("var swf_height = focus_height+text_height;\n");
text.Append("var pics=\"" + urls.ToString() + "\";\n");
text.Append("var links=" + links.ToString() + ";\n");
text.Append("var texts=\"" + texts.ToString() + "\";\n");
text.Append("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=\"'+ focus_width +'\" height=\"'+ swf_height +'\">');\n");
text.Append("document.write('<param name=\"allowScriptAccess\" value=\"sameDomain\"><param name=\"movie\" value=\"focus.swf\"><param name=\"quality\" value=\"high\"><param name=\"bgcolor\" value=\"#ffffff\">');\n");
text.Append("document.write('<param name=\"menu\" value=\"false\"><param name=wmode value=\"opaque\">');\n");
text.Append("document.write('<param name=\"FlashVars\" value=\"pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'\">');\n");
text.Append("document.write('<embed src=\"pixviewer.swf\" wmode=\"opaque\" FlashVars=\"pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'\" menu=\"false\" bgcolor=\"#F0F0F0\" quality=\"high\" width=\"'+ focus_width +'\" height=\"'+ focus_height +'\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />');\n");
text.Append("document.write('</object>');\n");
text.Append("</script>\n</a>");
}
else//没有flash新闻信息
{
text.Append("</script>\n</a>");
}
return text.ToString();
}
做asp.net不可能一点不懂js的。