62,046
社区成员
发帖
与我相关
我的任务
分享
<div>
<table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="middle"><table width="990" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td valign="top"><uc1:top id="Top1" runat="server">
</uc1:top></td>
</tr>
<tr>
<td height="7" valign="top">
</td>
</tr>
<tr>
<td align="center" valign="top"><table width="970" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="344" height="156" align="center" valign="middle" class="k"><img src="img/b02.jpg" mce_src="img/b02.jpg" width="340" height="152"></td>
<td align="right" valign="middle"><table width="614" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="156" align="center" valign="middle" class="k"><img src="img/b01.jpg" mce_src="img/b01.jpg" width="609" height="152"></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="7"></td>
</tr>
<tr>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="180" height="150" valign="top" bgcolor="#F9F9F9">
<uc2:a1 id="A1_1" runat="server">
</uc2:a1></td>
<td valign="top"><table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td height="28" bgcolor="EEEEEE"> </td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top" class="font06">+ <%=CateName%></td>
</tr>
<tr>
<td align="left" valign="top" style="height: 265px">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td align="center" height="40"><b> <%=Product.Title%><b></td></tr>
<tr><td align="center"><img src="<%=Product.PictureUrl %>" width="445" height="335" onload="javascript:DrawImage(this,445,335);"></td>
</tr>
<tr><td align="center"> </td></tr>
<tr><td valign="top"><%=Server.HtmlDecode(Product.Content)%></td></tr>
<tr align="center">
<td>
<asp:Label ID="LinkPrev" runat="server" Text="Label"><a href="CaseDetail.aspx?id=<%=PurviveID%>">上一页</a></asp:Label>
<asp:Label ID="Lab1" runat="server" Text="Label" Visible="false"></asp:Label>
<asp:Label ID="LinkNext" runat="server" Text="Label"><a href="CaseDetail.aspx?id=<%=NextID%>">下一页</a></asp:Label>
<asp:Label ID="Lab2" runat="server" Text="Label" Visible="false"></asp:Label>
<%=CateName %>共有:<asp:Label ID="LabCount" runat="server" Text=""><%=Count %></asp:Label>条信息
</td>
</tr>
</table>
</td>
</tr>
</table></td>
<td width="200" valign="top">
<uc3:right id="Right1" runat="server">
</uc3:right></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
</td>
</tr>
</table></td>
</tr>
<tr>
<td valign="top"> <uc4:bottom id="Bottom1" runat="server">
</uc4:bottom></td>
</tr>
</table></td>
</tr>
</table>
</div>
</form>
</body>
</html>
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/ws_hgo/archive/2009/03/31/4039049.aspx
<%@ Page Language="C#" %>
<%@ Register Src="top.ascx" TagName="top" TagPrefix="uc1" %>
<%@ Register Src="a1.ascx" TagName="a1" TagPrefix="uc2" %>
<%@ Register Src="right.ascx" TagName="right" TagPrefix="uc3" %>
<%@ Register Src="bottom.ascx" TagName="bottom" TagPrefix="uc4" %>
<mce:script runat="server"><!--
BJProduct Product = new BJProduct();
ArrayList MyArray = new ArrayList();
int ParentID;
//总产品数量
int Count = 0;
//前一个产品的ID
int PurviveID;
//下一个产品的ID
int NextID;
//当前产品ID
int id;
//最后一个产品的ID
int LastID;
//父类标题
protected string CateName = "";
BJProductCategory Category = new BJProductCategory();
protected void Page_Load(object sender, EventArgs e)
{
id = FormUtil.GetQueryInt("ID");
if (id != int.MinValue)
{
Product.ID = id;
}
WebManager.GetInfo(Product);
ParentID = Product.ParentID;
Category.ID = ParentID;
WebManager.GetInfo(Category);
CateName = Category.Title;
ShowCategory();
}
protected void ShowCategory()
{
Product.ParentID = ParentID;
//得出所有的该产品分类的信息
DataTable dt = WebManager.List(Product, "", "[ID],[Title]", "&parentid=", "[OrderNo]");
if (dt.Rows.Count > 0)
{
//总记录数
Count = dt.Rows.Count;
//将ID插入到Myarray数值中
for (int i = 0; i < dt.Rows.Count; i++)
{
MyArray.Add(dt.Rows[i][0]);
}
//找到最后一个产品的ID号
LastID = int.Parse(dt.Rows[Count - 1][0].ToString());
}
if (MyArray.Contains(id))
{
//得到当前ID的索引号
int aa = MyArray.BinarySearch(id);
//对应该产品分类中第一张图片的ID
int Col = int.Parse(MyArray[0].ToString());
// 如果当前ID为第一张图片的话,上一页去掉超链接,变为文本类型
if (Col == id)
{
PurviveID = id;
NextID = int.Parse(MyArray[1].ToString());
// LinkPrev.Visible = false;
LinkPrev.Enabled = false;
LinkPrev.Visible = false;
Lab1.Visible = true;
Lab1.Text = "上一页";
//Label Lab=new Label
}
//既不是第一张图片ID,也不是最后一张,就把文本类型的Lab去掉
else if (LastID == id)
{
PurviveID = int.Parse(MyArray[aa - 1].ToString());
NextID = id;
LinkNext.Enabled = false;
LinkNext.Visible = false;
Lab2.Visible = true;
Lab2.Text = "下一页";
}
// 如果当前ID为最后一张图片的话,下一页去掉超链接,变为文本类型
else
{
PurviveID = int.Parse(MyArray[aa - 1].ToString());
NextID = int.Parse(MyArray[aa + 1].ToString());
LinkPrev.Enabled = true;
LinkNext.Enabled = true;
Lab1.Visible = false;
Lab2.Visible = false;
}
}
}
// --></mce:script>
<html >
<head id="Head1" runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>武汉唐盛装饰工程有限公司</title>
<mce:style type="text/css"><!--
body,td,th {
font-size: 12px;
}
body {
margin:auto;
background-image: url(images/fondo-gris.gif);
}
.middle-demo-1{
height: 4em;
line-height: 4em;
overflow: hidden;
}
--></mce:style><style type="text/css" mce_bogus="1">body,td,th {
font-size: 12px;
}
body {
margin:auto;
background-image: url(images/fondo-gris.gif);
}
.middle-demo-1{
height: 4em;
line-height: 4em;
overflow: hidden;
}</style>
<link href="css/style.css" mce_href="css/style.css" rel="stylesheet" type="text/css"/>
<mce:script language="JavaScript"><!--
var k=0; //声明一个计数器变量
var imgname1="img/"; //所有图片地址的前面相同的部分,要根据实际修改这个值。
var imgname2=".jpg"; //图片的文件格式,可根据实际情修改,前面那个小点不要漏了。
var imgnub=4; //要展示的图片的张数,根据实际修改此值。
function start(){ //程序主体部分
obj=eval("img1"); //若图像标记的ID号改变,请修改括号中的字符串值。
if (obj.filters.item(0).Transition==23) // 这部分语句是用于改变切换样式,在23种样式中循环。
obj.filters.item(0).Transition=1;
else
obj.filters.item(0).transition++;
obj.filters.item(0).Apply();
if (k<imgnub) {k++; //这部分语句用于改变图像标记的src的图片地址(既含路径的文件名)。
}else {k=1;
}
obj.src=imgname1+k+imgname2;
obj.filters.item(0).Play();
setTimeout("start(1)",2500); //每三秒钟刷新一次。
}
// --></mce:script>
<mce:script type="text/javascript"><!--
function DrawImage(ImgD,FitWidth,FitHeight)
{
var image=new Image();
image.src=ImgD.src;
if(image.width>0 && image.height>0)
{
if(image.width/image.height>= FitWidth/FitHeight)
{
if(image.width>FitWidth)
{
ImgD.width=FitWidth;
ImgD.height=(image.height*FitWidth)/image.width;
}
else
{
ImgD.width=image.width;
ImgD.height=image.height;
}
}
else
{
if(image.height>FitHeight)
{
ImgD.height=FitHeight;
ImgD.width=(image.width*FitHeight)/image.height;
}
else
{
ImgD.width=image.width;
ImgD.height=image.height;
}
}
}
}
// --></mce:script>
</head>
<body>
<form id="form1" runat="server">