Tutorial :adding a Marquee in the middle of an ASP.net Page



Question:

I have an ASP.net page with dynamic content that are inside Controls, some of them custom controls and some of them regular ASP.net controls.

Is there a way to get those controls inside a Marquee? maybe an HTML Marquee? These controls are mostly built in this sense:

sometext


sometext


sometext

etc.

Thanks!


Solution:1

You should look into using jQuery. The Marquee tag is deprecated and doesn't work in all browsers.


Solution:2

I ended up doing this:

<asp:Literal id="Literal1" text="<marquee>"></asp:Literal>  some controls  <asp:Literal id="Literal2" text=</marquee>"></asp:Literal>  

Which is very similar to the solution Luke gave, but you can't just use as regular HTML in an asp.net page.


Solution:3

Literal marquee = new Literal();  marquee.Text = "<marquee style=color:#663300; font-weight:700; font-size:medium; width:877px; height:22px; margin-top:0px; position:relative; top:-3px; left:-73px; margin-left:0px;> Welcome ... >To Narsingham Page </marquee>";  this.Controls.Add(marquee);  

Put the above code under Page_Load in your project then you can get want you want.


Solution:4

I am trying to use a marquee tag in my project's master page. here is the code. gets the obvious error, googled it, but unable to find a work around.

<pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"><code>&lt;marquee style=&quot;color:#663300; font-weight:700; font-size:medium; width:877px; height:22px;              margin-top:0px; position:relative; top:-3px; left:-73px; margin-left:0px;&quot;&gt;  Welcome ... &gt;To Narsingham Page             &lt;/marquee&gt;    </pre>  

is there any way, i can use the same marquee in xhtml1.0, in my vs2010 project. i tried luke's method but it does not work this way. Is it necessary to use jquery in this senario . i find this html control easy, as i donot have much grip in jquery.

regs;\j


Solution:5

have you tried:

<marquee> <asp:YourUserControl ... /> </marquee>  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »