There may be a lot of beginner friends like me (especially those who have studied ASP) who have such a confusion. How does Asp.net (C #) Implement rolling news?
Let's take a simple example and leave a file for yourself.
< Marquee Onmouseover = "Javascript: this. Stop ();" Onmouseout = "Javascript: This. Start ();" Scrollamount = "1"
Direction = "Up" Style = "Width: 401px; Height: 132px" >
< ASP: DataGrid ID = Dgnews Runat = "Server" Height = "132px" Width = "392px" Borderstyle = "NONE" Showheader = "False" Gridlines = "NONE" Bordercolor = "White" Autogeneratecolumns = False Datasource = "<% # Dvnews %>" >
< Columns >
< ASP: boundcolumn Datafield = "Postid" Dataformatstring = "& Lt; IMG src = images/arrow.gif & gt ;" >
< Itemstyle Width = "10px" >
</ Itemstyle >
</ ASP: boundcolumn >
< ASP: hyperlinkcolumn Target = "_ Blank" Datanavigateurlfield = "Postid" Datanavigateurlformatstring = "Shownews. aspx? Postid = {0 }" Datatextfield = "Title" Sortexpression = "Postdate" > </ ASP: hyperlinkcolumn >
</ Columns >
</ ASP: DataGrid >
</ Marquee >
Dvnews is the data we obtain from the database.