ASP.NET(vb.net) & ListView - AlternatingItemTemplate Example scripts how to use ListView control in asp.net , The AlternatingItemTemplate gets or sets the object implementing ITemplate that defines how alternating items in the control are displayed.
ShotDev Focus:
- ASP.NET(vb.net) & ListView - AlternatingItemTemplate
Example
ListViewAlternateRows.aspx
<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<?
$objConnect = oci_connect("myuser","mypassword","TCDB");
$strSQL = "SELECT * FROM GALLERY";
$objParse = oci_parse($objConnect, $strSQL);
oci_execute ($objParse,OCI_DEFAULT);
echo"<table border="1" cellspacing="1" cellpadding="1"><tr>";
$intRows = 0;
while($objResult = oci_fetch_array($objParse,OCI_BOTH))
{
echo "<td>";
$intRows++;
?>
<center>
<img src="shotdev/<?=$objResult["PICTURE"];?>"><br>
<?=$objResult["GALLERYNAME"];?>
<br>
</center>
<?
echo"</td>";
if(($intRows)%2==0)
{
echo"</tr>";
}
}
echo"</tr></table>";
?>
</body>
</html>
<?
oci_close($objConnect);
?>
Create a asp.net file and save to path root-path/dotnet/
Run
http://localhost/dotnet/ListViewAlternateRows.aspx
Screenshot

