How to make testimonial slider page with c#.
I am fetching Client_Image + Client_Suggestions + Client Signature from database with Datatable dt.Rows(Dataset) in the testimonial COntent DIv.
i want to slide two testimonial from client in 3 second and then next two like this all the testimonials must be slide two by two..
Tell me Please anybody knws.... Urgent . That Would Be Better if Anyone send me Demo.
Example:
first two testimonial data with (Client_image+Client_Suggestion+Signature) will Slide
| Client testimonial1 | client testmonial 2 |
After this Next two Will show by slider
| Client testimonial3 | Client testimonial 4 |
Like this I wanna slide no. of data or images uploaded by client to Slide.
Thanks.
Ankur JainPosted Aug 16, 2014, 12:27 AM
try like this here i am passing static text in data rows you can fetch your database column name instead of static text:-
Design Page:
<%@ Page Language="C#" AutoEventWireup="true"CodeFile="Testimonials.aspx.cs" Inherits="Testimonials" %>
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">
<script src="Images/Jquery1.3.1.js" type="text/javascript">script>
<link href="images/testimonial.css" rel="stylesheet" type="text/css"/>
<script src="images/jquery.quovolver.js" type="text/javascript">script>
<title>Testimonial Using DataBasetitle>
<script type="text/javascript">
$(document).ready(function () {
$('blockquote').quovolver();
});
script>
head>
<body>
<form id="form1" runat="server">
<div style="margin-left: 50px; margin-top: 40px;">
<h2>
Testimonials Using DataBase In Asp.Net C#h2>
<div id="wrapper">
<div id="header" runat="server">
div>
div>
div>
form>
body>
html>
Code Behind:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using System.Data;
public partial class Testimonials : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
testimonial();
}
void testimonial()
{
try
{
DataTable dsPost = new DataTable();
dsPost.Columns.AddRange(new DataColumn[2] { new DataColumn("Desc"),new DataColumn("Name") });
dsPost.Rows.Add("This is good and easy article for implement in project."
+"This is good and easy article for implement in project. ", "Kamar Alam");
dsPost.Rows.Add("There is many article and demos on this website,"
+"Read Articles and Download articles code", "Alam");
dsPost.Rows.Add("Easy to use and Just Download and run code","Ameba");
dsPost.Rows.Add("Good Article and demos on this website,Read Articles "
+"and Download articles code", "Alam");
StringBuilder strPost = new StringBuilder();
if (dsPost.Rows.Count > 0)
{
for (int i = 0; i < dsPost.Rows.Count; i++)
{
strPost.Append(");
strPost.Append("
"
+ dsPost.Rows[i]["Desc"] + "
");strPost.Append("––"
+ dsPost.Rows[i]["Name"] + "");
strPost.Append("");
}
header.InnerHtml = strPost.ToString();
}
}
catch (Exception ex)
{ }
}}