adding a Marquee in the middle of an ASP.net Page
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
s开发者_Python百科ometext
etc.
Thanks!
You should look into using jQuery. The Marquee tag is deprecated and doesn't work in all browsers.
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.
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.
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><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>
</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
have you tried:
<marquee> <asp:YourUserControl ... /> </marquee>
精彩评论