如何将公告或新闻从后端添加到主页 [英] how to add the Announcements or news From the backend to the home page
问题描述
在我的项目中,我必须使用Marquee将新闻,数据库中的公告添加到主页.任何人都可以建议我,如何将其添加到我的项目中?
问候
NanKi
In my Project,I have To Add The News,Announcement from The DataBase To The Home Page Using Marquee.Can Anyone Suggest Me,How To Add this To My project?
with Regards
NanKi
推荐答案
亲爱的朋友,
尝试以下代码:-
Dear Friend,
Try this code:-
<marquee id="ml" style="text-align: center" direction="up" width="195" height="170">
scrolldelay="20" scrollamount="1" onmouseover="ml.stop();" onmouseout="ml.start();">
<asp:repeater id="Repeater1" runat="server" datasourceid="dtsLinks" xmlns:asp="#unknown">
<itemtemplate>
<br />
<div style="width: 150px">
<asp:imagebutton width="150px" height="75px" id="ImageButton1" runat="server">
ImageUrl=''<%# String.Format("~\\img\\Links\\{0}",Eval("logo")) %>'' PostBackUrl=''<%# Eval("link") %>'' ToolTip=''<%# Eval("title") %>'' /><br />
</asp:imagebutton></div>
<asp:hyperlink id="HyperLink1" runat="server" navigateurl="<%# Eval("link") %>">
<asp:label id="Label1" runat="server" text="<%# Eval("title") %>"></asp:label></asp:hyperlink><br />
</itemtemplate>
</asp:repeater>
</marquee>
这些链接将对您有很大帮助:-
http://allen-conway-dotnet.blogspot. in/2010/03/how-to-create-scrolling-news-marquee.html [ http://mattberseth.com/blog/2008/01/cnn_style_scrolling_ticker_wit.html [ ^ ]
http://wiki .asp.net/page.aspx/1501/从字幕库中获取数据并放置在字幕中 [ http://stackoverflow.com/questions/5386977/dynamic-marquee-in-asp-net [ ^ ]
These link will be of much help to you:-
http://allen-conway-dotnet.blogspot.in/2010/03/how-to-create-scrolling-news-marquee.html[^]
http://mattberseth.com/blog/2008/01/cnn_style_scrolling_ticker_wit.html[^]
http://wiki.asp.net/page.aspx/1501/fetch-data-from-the-database-and-place-it-in-a-marquee/[^]
http://stackoverflow.com/questions/5386977/dynamic-marquee-in-asp-net[^]
这篇关于如何将公告或新闻从后端添加到主页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!