Use custom controls for screen scrolling
First, add a new project (just like creating a webpage), add a Web user control, and name it guanping. ascx. The main code is as follows:
<% @ Control Language = "C #" autoeventwireup = "true" codefile = "guanping. ascx. cs" inherits = "guanping" %>
<P>
<Marquee direction = "up" scrollamount = "2" align = "Middle"
Onmouseout = "This. Start ()" onmouseover = "this. Stop ()" style = "height: pixel">
<Span style = "font-size: 9pt">
<Br/>
<Br/>
1. Connection error page p11
<Br/>
2. Implementation of scrolling P18
<Br/>
3. Reset Control Implementation p21.
<Br/>
4. Select Control Implementation P25
<Br/>
5. Event P31 with mouse sliding over button implemented by style sheet
<Br/>
6. drop-down menu p35 implemented by style sheet
<Br/>
7. Pop-up page for exercise P53
<Br/>
8. Data Conversion Between gridview and Excel p131
<Br/>
9. Floating advertisement p192
<Br/>
10. upload files to the database p237
<Br/>
11. upload images to the database and understand the principles of File Upload p249
<Br/>
12. Read and display the P250 and p50 images in the database.
<Br/>
13. Implementation of the online voting function p473
<Br/>
13. File Download function p505
<Br/>
Chapter 14, 13, 14, 15, 16, 17, and 18
15. Refer to Chapter 19
</Span> </marquee> </P>
Next, create the web page gun. aspx and reference the custom control gunping. ascx. The Code is as follows:
<Body>
<Form ID = "form1" runat = "server">
<Div>
<Uc1: guanping id = "guanping1" runat = "server"/>
</Div>
</Form>
</Body>
To obtain the scrolling effect.
Note: "XHTML 1.0 transitional does not support element marquee" this is a warning and cannot be used in any way. If you want to use js to implement scrolling
You can refer to the following URL code:
Http://blog.csdn.net/taomanman/article/details/6577874