<%@ Control Language="C#" AutoEventWireup="true" CodeFile="LatestUpdateTicker.ascx.cs" Inherits="LatestUpdateTicker" %> <link href="../Css/ticker-style.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> $(function () { $('#js-news').ticker(); }); </script> <asp:Literal ID="lit_UpdateTicker" runat="server"></asp:Literal>
DBUtill obj = new DBUtill(); string sql = "select * from tbl_UPDATES"; DataTable dt = new DataTable(); dt = obj.GetDataSet(sql).Tables[0]; if (dt.Rows.Count != 0) { string str = "<div id=\"ticker-wrapper\" class=\"no-js\"><ul id=\"js-news\" class=\"js-hidden\">"; foreach (DataRow dr in dt.Rows) { str += "<li class=\"news-item\"><a href=\"" + Server.UrlPathEncode(dr["Link"].ToString()) + "\">" + dr["Title"].ToString() + "</a></li>"; } str += "</ul></div>"; lit_UpdateTicker.Text = str; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)