Shankey
posted
178 posts
since
Aug 05, 2010
from
|
|
Re: ASP.net Marque link from database example required
|
|
|
|
|
|
|
|
|
|
|
Hi,
You can pass that db value to javascript and by getelement by id you can change the text of the marque.
Please reply if want the code.
|
|
|
|
|
If this post helped you, then tick the checkbox above "Do you like this Answer"
Shakey Shankey
|
|
|
|
|
|
Imran Pervez
posted
30 posts
since
Mar 29, 2007
from
Jodhpur
|
|
Re: ASP.net Marque link from database example required
|
|
|
|
|
|
|
|
|
|
THANKS FOR REPLY IF U CAN SEND ME CODE IT WILL BE HELPFULE FOR ME
PLZ SEND IT ON imran0291@gmail.com
|
|
|
|
|
|
Shankey
posted
178 posts
since
Aug 05, 2010
from
|
|
Re: ASP.net Marque link from database example required
|
|
|
|
|
|
|
|
|
|
|
hi,
Following is your code: but dont forget to mark my answer as accepted :)
using System; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq;
public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { String yourDbvalue = "Maninder";
ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "setMarqueeText", "setMarqueeText('"+ yourDbvalue +"');", true);
} }
your aspx code: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Untitled Page</title>
<script language="javascript" type="text/javascript"> function setMarqueeText(txt) { var mrq= document.getElementById('mar'); mrq.innerHTML=txt; } </script>
</head> <body > <form id="form1" runat="server"> <div> <marquee id="mar" behavior="slide" direction="left">Your slide-in text goes here</marquee> </div> </form> </body> </html>
|
|
|
|
|
If this post helped you, then tick the checkbox above "Do you like this Answer"
Shakey Shankey
|
|
|
|
|
|