|
-
Mar 6th, 2009, 03:12 AM
#1
Thread Starter
Member
[RESOLVED] Displaying text in a marquee
I have a webpage created using ASP.net and C# 2005.
I need to display some text as a marquee (scrolling text from right to left). The text will come from a table and I have already assigned it to a string variable. But I am unable to create the marquee effect. I need to apply backcolor, forecolor and other styles like bold, large font size etc to the scrolling text. I was thinking of using a Panel as a container for the marquee.
How do I implement this feature?
Lalit Kumar Barik
India
-
Mar 6th, 2009, 03:33 AM
#2
Re: Displaying text in a marquee
Hey,
Depending on what browser you are targetting, you could use the following:
http://www.htmlcodetutorial.com/_MARQUEE.html
Gary
-
Mar 6th, 2009, 03:54 AM
#3
Re: Displaying text in a marquee
As counter-friendly as this may seem to you, why are you using a marquee? It's a proprietary tag, it shouldn't be used, and above all, it's annoying. If you want something that's more aesthetically pleasing, what about something like the BBC news ticker?
-
Mar 6th, 2009, 04:26 AM
#4
Thread Starter
Member
Re: Displaying text in a marquee
@gep13, I forgot to mention in my original post, but I know about the <marquee> tag used in plain old HTML, I am not sure how to use it inside my ASP.net webpage. I am also not sure how to change the attributes and display the contents of a string variable. The target audience will be using Internet Explorer in almost all cases and hence I am not worrying about browser incompatibility.
@mendhak, I also agree with you about the annoying nature of the <marquee> tag. But the owner of the website is insisting on it (actually about the scrolling nature). I am open to other suggestions (like a horizontal scrolling news ticker) as long as I get the scrolling text effect.
Thanks for your suggestions.
Lalit Kumar Barik
India
(P.S. @mendhak, are you from my country?)
-
Mar 6th, 2009, 04:32 AM
#5
Re: Displaying text in a marquee
Hey,
To answer your specific question, have a look here:
http://forums.asp.net/p/1255316/2331625.aspx
Also, you might want to think about other solutions here:
http://www.dynamicdrive.com/dynamicindex2/
Hope that helps!!
Gary
-
Mar 6th, 2009, 09:39 AM
#6
Re: Displaying text in a marquee
Avoid the HTML <marquee> at all costs. It's clumsy, and just plain looks bad. If you need that effect, coming up with a little bit of JavaScript would not be difficult (probably 10 minutes for me, if that), and there are multiple jQuery plugins that have been written to do the same thing. Google it... the site I think I'd recommend isn't responding to me at the moment.
-
Mar 10th, 2009, 02:26 AM
#7
Re: Displaying text in a marquee
@mendhak, I also agree with you about the annoying nature of the <marquee> tag. But the owner of the website is insisting on it (actually about the scrolling nature). I am open to other suggestions (like a horizontal scrolling news ticker) as long as I get the scrolling text effect.
You can have a look at a javascript solution
http://www.makemineatriple.com/2007/10/bbcnewsticker/
It's less straining on the eyes and you may be able to convince them to use it by saying "BBC uses it...". You may also want to inform the website owner that we're no longer living in 1993... it's 15 years later.
(P.S. @mendhak, are you from my country?)
I do not recognize any nationalities aside from 'programmer'.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|