Simple way to dynamically load text to marquee

There might be many other way to load text dynamically to marquee, like javascript, Ajax or Jquery library. But I will show a very easy way using HTML and  Asp.Net

The aspx page will look like

<marquee direction="left"  onmouseover="this.stop()" 
onmouseout="this.start()" scrolldelay="100" 
style="height: 127px; width: 457px;">
    <asp:Literal ID="ltDisplay" runat="server">
    </asp:Literal>
</marquee>

The code behind page will look like

 protected void Page_Load(object sender, EventArgs e){ 
ltDisplay.Text = SomeMethodCallingActualText();  
}

Happy Coding!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s