原来 <%=xxx%>在asp.net中也挺好用,就是变量XXX
<marquee onmouseover="this.stop()"; onmouseout="this.start()"; scrollAmount="4" direction="left" width="500" height="40">
<%=ss %>
</marquee> </div>
protected void ShowAfficheRoll(DataSet ds)
...{
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
...{
if (i != 0) 
...{
ss += " <a href=# onclick=";
}
ss += """;
ss += "javascript:showPopWin('公告详情','ShowAffiche.aspx?id=";
ss +=ds.Tables[0].Rows[i][0].ToString();
ss +="', 400, 400, null,true)";
ss += """;
ss += "> ";
ss += ds.Tables[0].Rows[i][1].ToString();
ss += "</a> ";
}
}
本文介绍如何在ASP.NET中使用<%= %>语法动态生成HTML内容,并通过示例展示了如何构建滚动公告栏,包括从数据集中获取信息并将其格式化为带有链接的文本。

2698

被折叠的 条评论
为什么被折叠?



