I need to do it in VB.NET codes
:
Simple example:
<!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>
<style type="text/css">
</style>
<SCRIPT language="JavaScript">
<!--
var img1 = null;
var img2 = null;
var img3 = null;
if (document.images)
{
img1 = new Image();
img1.src="img/1.jpg";
img2= new Image();
img2.src="img/2.jpg";
img3= new Image();
img3.src="img/3.jpg";
}
var index = 0;
setTimeout('ChangeImage()', 5000);
function ChangeImage()
{
index = (++index % 3) + 1;
document.images["imgPicture"].src = eval('img' + index.toString() +
'.src');
setTimeout('ChangeImage()', 5000);
}
//-->
</SCRIPT>
</head>
<body>
<form id="form1" runat="server">
<img id="imgPicture" name="imgPicture" src="img/1.jpg"/>
<input type=button value="Show" name="btnShow"
onclick="ChangeImage()"/>
</form>
</body>
</html>
--
Milosz Skalecki
MCP, MCAD
:
I am trying to write codes in VB.net to display 3 images in series on a
Webform with each image being displayed in the same box for 5 seconds.
I am trying to use Timer and image button, don't know how to get around it.
thanks for any help