Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET SQL-Server HTML , +
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:
=================
 
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
====================================
 
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 23-Jun-12 0:36am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Use this it just works fine for me:
<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
  Permalink  
v2

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

  Print Answers RSS
0 OriginalGriff 390
1 Jochen Arndt 150
2 Richard MacCutchan 135
3 DamithSL 95
4 Garth J Lancaster 90
0 OriginalGriff 6,045
1 DamithSL 4,601
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,260


Advertise | Privacy | Mobile
Web01 | 2.8.141220.1 | Last Updated 23 Jun 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100