Click here to Skip to main content
15,890,973 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
Dear Experts !!

Am working on Asp.net , C#, Sqlserver 2005.

On my webpage I used Literal Controls to Scroll the data from Database.

DATABASE Marquee scrolls from RIGHT To LEFT. SO after 2 minutes its stops Scrolling.

Please can u show me , how to make marquee Continously Scroll.

this is my code:
=================

XML
string textDep = "<marquee style='position: relative;' width='100%' height='50' behavior='slide' direction='left' loop='-1'>" + strdep + "<br />" + "</marquee>";


 string textArr = "<marquee style='position: relative;' width='100%' height='50' behavior='slide' direction='left' loop='-1'>" + strarr + "<br />" + "</marquee>";




        Literal1.Text = textDep;
        Literal2.Text = textArr;



and this is my database Procedure
====================================

SQL
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go





ALTER procedure [dbo].[scroll_arrival]
as
begin
declare @fltno nvarchar(50)
declare @sta nvarchar(50)
declare @cities1 nvarchar(50)
declare @pubr nvarchar(50)
declare @car nvarchar(50)
declare @getdetails nvarchar(4000)
set @getdetails = ''

declare  c1_cursor cursor for
select fltno, sta, cities1, pubr,car from arrivals
open c1_cursor
fetch next from c1_cursor into @fltno, @sta, @cities1, @pubr, @car

while @@fetch_status = 0
begin
set @getdetails = (select @getdetails) + ' <img src="images/'+(select @car)+'.jpg" width="150" height="41" align="absmiddle" /> ' + (select cast(@fltno as nvarchar(50))) + ' ' +
(select cast(@sta as nvarchar(50))) + ' ' + (select cast(@cities1 as nvarchar(50))) + ' '
+ '<span class="style3" style="background-color:#00FF00">' + (select cast(@pubr as nvarchar(50)))+ '</span>'
fetch next from c1_cursor into @fltno, @sta, @cities1, @pubr,@car
end
close c1_cursor
deallocate c1_cursor

select @getdetails as arrivals
end

--exec scroll_arrival




Please can u show me , how to make marquee Continously Scroll.

THANKS IN ADVANCE.
Posted

1 solution

Use this it just works fine for me:
HTML
<marquee behavior="scroll" direction="down" scrollamount="6" style="position:absolute; left:200px; top:-240px; width:75px; height:1000; z-index:1;">
<span class="falling1"><img src="cart.gif"></img></span>
</marquee>




I removed extra closing tag or marquee
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900