Please help me to display all current date data and Image as marquee direction='up' in asp c#.
<marquee direction='up' scrolldelay='100' onmouseover='this.stop();' onmouseout='this.start();' style='height:410px;'>
<div>
<asp:DataList ID="DataList1" runat="server" RepeatDirection="Horizontal" RepeatColumns="1">
<ItemTemplate>
<div style="border: 2px solid #ccc;">
<b>Image:</b>
<asp:Label ID="Label7" Text='<%# Eval("PhotoPath") %>' runat="server" />
<br />
<b>Name:</b>
<asp:Label ID="Label1" Text='<%# Eval("nm") %>' runat="server" />
<br />
<b>Vehicle Reg. No.:</b>
<asp:Label ID="Label2" Text='<%# Eval("Vhclrgn") %>' runat="server" />
<br />
<b>Speed(KM/H) :</b>
<asp:Label ID="Label3" Text='<%#Eval("spd","{0:dd/MM/yyyy}") %>' runat="server" />
<br />
<b>Deptt./Agency:</b>
<asp:Label ID="Label4" Text='<%# Eval("dptangcy") %>' runat="server" />
<br />
<b>Date of Violators</b>
<asp:Label ID="Label5" Text='<%# Eval("vltrsdt") %>' runat="server" />
<br />
<b>Location</b>
<asp:Label ID="Label6" Text='<%# Eval("lcn") %>' runat="server" />
<br />
</ItemTemplate>
</asp:DataList>
</div>
</marquee>
namespace sfty1
{
public partial class Spd_vltrs_vw : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
this.BindListView();
}
}
private void BindListView()
{
string constr = ConfigurationManager.ConnectionStrings["constr"].ConnectionString;
using (SqlConnection con = new SqlConnection(constr))
{
using (SqlCommand cmd = new SqlCommand())
{
cmd.CommandText = "SELECT EID,nm,Vhclrgn,spd,dptangcy,vltrsdt,lcn,PhotoPath FROM Spd_Vltrs WHERE vltrsdt > = @vltrsdt and month(vltrsdt)=month(getdate()) and Day(vltrsdt)=Day(getdate()) and isnull(sn_to_intrant,0)='YES' ORDER BY Month(vltrsdt)*100+Day(vltrsdt)";
cmd.Connection = con;
cmd.Parameters.AddWithValue("@vltrsdt", DateTime.Now.ToString("yyy-MM-dd"));
using (SqlDataAdapter sda = new SqlDataAdapter(cmd))
{
DataTable dt = new DataTable();
sda.Fill(dt);
DataList1.DataSource = dt;
DataList1.DataBind();
}
}
}
}
}
}