?? selproducts.asp
字號:
<%
IF Request.QueryString("SCatID") = "" Then
Response.Redirect("Default.asp")
ELSE
STechID = CInt(Request.QueryString("SCatID"))
END IF
Dim StrBookName, STechID, StrTechName, StrQueryTech, StrQuerySelectedTech, ObjRSTechName, ObjRSList
GetTechName(STechID)
Function GetTechName(TechID)
StrQueryTech = "Select TechName From Category Where TechID=" & TechID
Set ObjRSTechName = ObjCon.Execute(StrQueryTech)
StrTechName = ObjRSTechName("TechName")
End Function
StrQuerySelectedTech = "Select ProductID, TechID, Name, Quality, Type,PRice, ImagePath From Products Where TechID=" & STechID
Set ObjRSList = ObjCon.Execute(StrQuerySelectedTech)
%>
<table border="0">
<tr>
<td class="SimpleText">You are in <b><%= StrTechName %></b> category.</td>
</tr>
</table>
<%
While Not ObjRSList.EOF
%>
<table width="70%" border="2" cellspacing="0" style="border-collapse:collapse" bordercolor="#CCCCCC">
<tr>
<td width="57%"><a href="ViewProductsDetails.asp?SCatID=<%= ObjRSList("TechID") %>&ProductID=<%= ObjRSList("ProductID") %>" class="NormalLink"><% StrProductName=ObjRSList("Name") %><%= StrBookName %></a></td>
<td width="43%" rowspan="5">
<div align="center"><img src="<%= ObjRSList("ImagePath") %>" alt="<%= StrBookName %>"><br><br><a href="AddToCart.asp?SCATID=<%= ObjRSList("TechID") %>&ProductID=<%= ObjRSList("ProductID") %>" class="NormalLink">Add To Cart</a> | <a href="ViewCart.asp" class="NormalLink">View Cart</a></div>
</td>
</tr>
<tr>
<td width="57%" class="SimpleText">Product Name: <%= ObjRSList("Name") %></td>
</tr>
<tr>
<td width="57%" class="SimpleText">Product ID: <%= ObjRSList("ProductId") %></td>
</tr>
<tr>
<td width="57%" height="22" class="SimpleText">Price: <%= ObjRSList("Price") %></td>
</tr>
</table>
<hr color="black" noshade>
<%
ObjRSList.MoveNext
Wend
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -