在asp.net中
这个效果的图片从数据库中取出来但是(c#语言)asp页面和c#文件代码怎么写啊
追问:我这里有一段js的页面的代码能否帮我改成asp.net(页面)能用的
function g(t)
if len(t)>12 then
g=left(t,12)&"…"
else
g=t
end if
end functionpic=""
link=""
imgtext=""sql="select top 5 * from zm_news where img<>'' order by id desc"
Set rs=conn.execute(sql)
do while not rs.eof
pic=pic&"|"&rs("img")
link=link&"|"&"news_view.asp?id="&rs("id")
imgtext=imgtext&"|"&g(rs("title"))
rs.MoveNext
loop
rs.Close
set rs=nothing
pic=right(pic,len(pic)-1)
link=right(link,len(link)-1)
imgtext=right(imgtext,len(imgtext)-1)
%>
<a target=_blank href=><span class="f14b">
<script type="text/javascript">var focus_width=200
var focus_height=140
var text_height=20
var swf_height = focus_height+text_height
var pics="<%=pic%>"
var links="<%=link%>"
var texts="<%=imgtext%>"
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 +'">');
document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="playswf.swf"><param name=wmode value=transparent><param name="quality" value="high">');
document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
document.write('<embed src="playswf.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#DADADA" quality="high" width="'+ focus_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage=" http://www.macromedia.com/go/getflashplayer" />'); document.write('</object>');
//-->
</script>
</span></a><span id="focustext" class="f14b"> </span>
<body>
</body>
</html>