Here I will represent a article in this article we are using a slider which using any header of project that means master page the main important things this slider changes different diffrent color or image as you use in project.Hope this article helpfull for you...................
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
<!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></title>
<script language="JavaScript1.1">
<!--
/*
JavaScript Image slideshow:
By JavaScript Kit (http://www.javascriptkit.com/)
Over 200+ free JavaScript here!
*/
var slideimages=new Array()
var slidelinks=new Array()
function slideshowimages(){
for (i=0;i<slideshowimages.arguments.length;i++){
slideimages[i]=new Image()
slideimages[i].src=slideshowimages.arguments[i]
}
}
function slideshowlinks(){
for (i=0;i<slideshowlinks.arguments.length;i++)
slidelinks[i]=slideshowlinks.arguments[i]
}
function gotoshow(){
if (!window.winslide||winslide.closed)
winslide=window.open(slidelinks[whichlink])
else
winslide.location=slidelinks[whichlink]
winslide.focus()
}
//-->
</script>
<%--<link href="~/Styles/Site.css" rel="stylesheet" type="text/css" />--%>
</head>
<body>
<form id="form1" runat="server">
<div>
<a href="javascript:gotoshow()"><img src="cnt_bbul.jpg" name="slide" border=0
style="width: 980px; height: 197px"></a>
<script>
//configure the paths of the images, plus corresponding target links
slideshowimages("cnt_bbul.jpg", "cnt_bul.jpg", "cnt_gbul.jpg", "cnt_ibox.jpg", "cnt_ibox1.jpg")
slideshowlinks("http://ambrosia-amrit.blogspot.in/2012/05/aspnet-web-template-with-extension.html", "http://ambrosia-amrit.blogspot.in/2012/05/how-to-use-link-button-in-gridview.html", "http://ambrosia-amrit.blogspot.in/2012/05/how-show-value-in-grid-view-in-aspnet_07.html", "http://ambrosia-amrit.blogspot.in/2012/05/how-use-popup-on-mouse-eventb-in-aspnet.html", "http://ambrosia-amrit.blogspot.in/2012/05/how-delete-check-box-wise-in-grid-view.html")
//configure the speed of the slideshow, in miliseconds
var slideshowspeed = 2000
var whichlink = 0
var whichimage = 0
function slideit() {
if (!document.images)
return
document.images.slide.src = slideimages[whichimage].src
whichlink = whichimage
if (whichimage < slideimages.length - 1)
whichimage++
else
whichimage = 0
setTimeout("slideit()", slideshowspeed)
}
slideit()
</script>
</div>
</form>
</body>
</html>
Very nice article.
ReplyDeleteYou can also use this JQuery cycle plugin.
To download image slide show asp.net example visit this link.
http://jayeshsorathia.blogspot.com/2013/02/image-slide-show-using-jquery-with-aspnet-example.html
Yes You can use jquery or javascript as you wish.
ReplyDelete