flash文件下载/Files/xiachufeng/focus1.swf
前台代码:
<div runat="server" ></div>
后台代码
/// <summary>
/// 动态绑定flash 中的图片,图片标题
/// </summary>
public void showFlash()
{
IList<NewsArticle> articleList = article.ListNewsArticleByRows("22",500);//后台方法 22是id ,500是显示500条数据
int count = 0;
string pics = ""; //图片路径
string links = "";
string texts = ""; //标题
for (int i = 0; i < articleList.Count; i++)
{
NewsArticle articleNew = (NewsArticle)articleList[i];
if (articleNew.Content == "")
{
continue;
}
string content = ((NewsArticle)articleList[i]).Content;
int firstIndex = content.LastIndexOf("src=");
if (firstIndex < 0)
{
continue;
}
else
{
int lastIndex = content.LastIndexOf("jpg")+3;
string fileName = content.Substring(firstIndex+5,lastIndex-(firstIndex+5));
//fileName = "images/a1.jpg|images/a2.jpg|images/a3.jpg|images/a4.jpg|images/a5.jpg";
pics += fileName;
links += "PhySituationDetails.aspx?;
this.flashTD.InnerHtml= innerHtml;
}