开发者

Dynamic Marquee in asp.net

开发者 https://www.devze.com 2023-02-18 02:34 出处:网络
How I can create dynamic marquee in c#.net? That means 开发者_如何学GoI want to display announcements in home page, direction from top to bottom in allotted space, only two announcenets at a time, it

How I can create dynamic marquee in c#.net? That means 开发者_如何学GoI want to display announcements in home page, direction from top to bottom in allotted space, only two announcenets at a time, it should come dynamically.Thanks.


<asp:Literal ID="Literal1" runat="server"></asp:Literal>

Then you can give value for the literal.

protected void Page_Load(object sender, EventArgs e)
{
    string str = "get data from database";
    string text = "<MARQUEE>" + str + "</MARQUEE>";
    Literal1.Text = text;
}

http://www.htmlcodetutorial.com/_MARQUEE.html

http://logicbox.net/jquery/simplyscroll/horizontal.html


its can be easily done using jquery plugin... try using http://www.gmarwaha.com/jquery/jcarousellite/ i think its pretty much customizable.

Regards.

<div>
        <button class="prev">
            <<</button>
        <button class="next">
            >></button>
        <div class="anyClass" >
            <ul >
                <li style="padding:0px 10px">
                    <a href="#">This is a test Text to test this scroll 1</a></li>
                <li style="padding:0px 10px">
                    This is a test Text to test this scroll 2</li>
                <li style="padding:0px 10px">
                    This is a test Text to test this scroll 3</li>
                <li style="padding:0px 10px">
                    This is a test Text to test this scroll 4</li>
            </ul>
        </div>
    </div>

<script language="javascript">
        $(function () {
            $(".anyClass").jCarouselLite({
                btnNext: ".next",
                btnPrev: ".prev",
                auto: 1000,
                speed: 1000,
                visible: 1
            });
        });
    </script>
0

精彩评论

暂无评论...
验证码 换一张
取 消