C#的商品分类,商品修 改删除
[
2008/05/21 18:08 | by Else ]
2008/05/21 18:08 | by Else ]
<%@ Page Language="C#" ContentType="text/html" ResponseEncoding="utf-8"%>
<%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls" Assembly="DreamweaverCtrls,version=1.0.0.0,publicKeyToken=836f606ede05d46a,culture=neutral" %>
<MM:Insert
runat="server"
CommandText='<%# "INSERT INTO dbo.cuku_cat (catname, catlist, catcont) VALUES (?, ?, ?)" %>'
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_STRING_conn"] %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_DATABASETYPE_conn"] %>'
Expression='<%# Request.Form["MM_insert"] == "form2" && Request.Form["id"]=="" && Request.Form["catname"]!="" %>'
CreateDataSet="false"
SuccessURL='<%# "adminproducts.aspx?act=class" %>'
FailureURL='<%# "adminproducts.aspx?act=class" %>'
Debug="true"
>
<Parameters>
<Parameter Name="@catname" Value='<%# ((Request.Form["catname"] != null) && (Request.Form["catname"].Length > 0)) ? Request.Form["catname"] : "" %>' Type="VarChar" />
<Parameter Name="@catlist" Value='<%# ((Request.Form["catlist"] != null) && (Request.Form["catlist"].Length > 0)) ? Request.Form["catlist"] : "" %>' Type="Integer" />
<Parameter Name="@catcont" Value='<%# ((Request.Form["catcont"] != null) && (Request.Form["catcont"].Length > 0)) ? Request.Form["catcont"] : "" %>' Type="VarChar" />
</Parameters>
</MM:Insert>
<MM:Update
runat="server"
CommandText='<%# "UPDATE dbo.cuku_cat SET catcont=?, catlist=?, catname=? WHERE id=?" %>'
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_STRING_conn"] %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_DATABASETYPE_conn"] %>'
Expression='<%# Request.Form["MM_update"] == "form2" && Request.Form["id"]!="" %>'
CreateDataSet="false"
SuccessURL='<%# "adminproducts.aspx?act=class" %>'
Debug="true"
>
<Parameters>
<Parameter Name="@catcont" Value='<%# ((Request.Form["catcont"] != null) && (Request.Form["catcont"].Length > 0)) ? Request.Form["catcont"] : "" %>' Type="VarChar" />
<Parameter Name="@catlist" Value='<%# ((Request.Form["catlist"] != null) && (Request.Form["catlist"].Length > 0)) ? Request.Form["catlist"] : "" %>' Type="Integer" />
<Parameter Name="@catname" Value='<%# ((Request.Form["catname"] != null) && (Request.Form["catname"].Length > 0)) ? Request.Form["catname"] : "" %>' Type="VarChar" />
<Parameter Name="@id" Value='<%# ((Request.Form["id"] != null) && (Request.Form["id"].Length > 0)) ? Request.Form["id"] : "" %>' Type="Integer" />
</Parameters>
</MM:Update>
<MM:Delete
runat="server"
CommandText='<%# "DELETE FROM dbo.cuku_cat WHERE id=?" %>'
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_STRING_conn"] %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_DATABASETYPE_conn"] %>'
Expression='<%# ((Request.QueryString["act"] == "del") && (Request.QueryString["do"]=="class")) %>'
CreateDataSet="false"
SuccessURL='<%# "adminproducts.aspx?act=class" %>'
FailureURL='<%# "adminproducts.aspx?act=class" %>'
Debug="true"
><Parameters>
<Parameter Name="@id" Value='<%# ((Request.QueryString["id"] != null) && (Request.QueryString["id"].Length > 0)) ? Request.QueryString["id"] : "" %>' Type="Integer" />
</Parameters>
</MM:Delete>
<!--插入产品-->
<MM:Insert
runat="server"
CommandText='<%# "INSERT INTO dbo.cuku_products (prodoucts, catid, content, recom, uptop, isnew, cont, pic) VALUES (?, ?, ?, ?, ?, ?, ?, ?)" %>'
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_STRING_conn"] %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_DATABASETYPE_conn"] %>'
Expression='<%# Request.Form["MM_insert"] == "form1" && Request.Form["id"].Trim()=="" %>'
CreateDataSet="false"
SuccessURL='<%# "adminproducts.aspx" %>'
FailureURL='<%# "adminproducts.aspx?act=add" %>'
Debug="true"
><Parameters>
<Parameter Name="@prodoucts" Value='<%# ((Request.Form["prodoucts"] != null) && (Request.Form["prodoucts"].Length > 0)) ? Request.Form["prodoucts"] : "" %>' Type="VarChar" />
<Parameter Name="@catid" Value='<%# ((Request.Form["catid"] != null) && (Request.Form["catid"].Length > 0)) ? Request.Form["catid"] : "" %>' Type="Integer" />
<Parameter Name="@content" Value='<%# ((Request.Form["content"] != null) && (Request.Form["content"].Length > 0)) ? Request.Form["content"] : "" %>' Type="VarChar" />
<Parameter Name="@recom" Value='<%# ((Request.Form["recom"] != null) && (Request.Form["recom"].Length > 0)) ? Request.Form["recom"] : "" %>' Type="Boolean" />
<Parameter Name="@uptop" Value='<%# ((Request.Form["uptop"] != null) && (Request.Form["uptop"].Length > 0)) ? Request.Form["uptop"] : "" %>' Type="Boolean" />
<Parameter Name="@isnew" Value='<%# ((Request.Form["isnew"] != null) && (Request.Form["isnew"].Length > 0)) ? Request.Form["isnew"] : "" %>' Type="Boolean" />
<Parameter Name="@cont" Value='<%# ((Request.Form["cont"] != null) && (Request.Form["cont"].Length > 0)) ? Request.Form["cont"] : "" %>' Type="VarChar" />
<Parameter Name="@pic" Value='<%# ((Request.Form["pic"] != null) && (Request.Form["pic"].Length > 0)) ? Request.Form["pic"] : "" %>' Type="VarChar" />
</Parameters>
</MM:Insert>
<MM:Update
runat="server"
CommandText='<%# "UPDATE dbo.cuku_products SET cont=?, content=?, isnew=?, recom=?, catid=?, pic=?, prodoucts=?, uptop=? WHERE id=?" %>'
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_STRING_conn"] %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_DATABASETYPE_conn"] %>'
Expression='<%# Request.Form["MM_update"] == "form1" && Request.Form["id"].Trim()!="" %>'
CreateDataSet="false"
SuccessURL='<%# "adminproducts.aspx" %>'
Debug="true"
>
<Parameters>
<Parameter Name="@cont" Value='<%# ((Request.Form["cont"] != null) && (Request.Form["cont"].Length > 0)) ? Request.Form["cont"] : "" %>' Type="VarChar" />
<Parameter Name="@content" Value='<%# ((Request.Form["content"] != null) && (Request.Form["content"].Length > 0)) ? Request.Form["content"] : "" %>' Type="VarChar" />
<Parameter Name="@isnew" Value='<%# ((Request.Form["isnew"] != null) && (Request.Form["isnew"].Length > 0)) ? Request.Form["isnew"] : "" %>' Type="Boolean" />
<Parameter Name="@recom" Value='<%# ((Request.Form["recom"] != null) && (Request.Form["recom"].Length > 0)) ? Request.Form["recom"] : "" %>' Type="Boolean" />
<Parameter Name="@catid" Value='<%# ((Request.Form["catid"] != null) && (Request.Form["catid"].Length > 0)) ? Request.Form["catid"] : "" %>' Type="Integer" />
<Parameter Name="@pic" Value='<%# ((Request.Form["pic"] != null) && (Request.Form["pic"].Length > 0)) ? Request.Form["pic"] : "" %>' Type="VarChar" />
<Parameter Name="@prodoucts" Value='<%# ((Request.Form["prodoucts"] != null) && (Request.Form["prodoucts"].Length > 0)) ? Request.Form["prodoucts"] : "" %>' Type="VarChar" />
<Parameter Name="@uptop" Value='<%# ((Request.Form["uptop"] != null) && (Request.Form["uptop"].Length > 0)) ? Request.Form["uptop"] : "" %>' Type="Boolean" />
<Parameter Name="@id" Value='<%# ((Request.Form["id"] != null) && (Request.Form["id"].Length > 0)) ? Request.Form["id"] : "" %>' Type="Integer" />
</Parameters>
</MM:Update>
<MM:DataSet
id="rs"
runat="Server"
IsStoredProcedure="false"
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_STRING_conn"] %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_DATABASETYPE_conn"] %>'
CommandText='<%# "SELECT * FROM dbo.cuku_cat ORDER BY id DESC" %>'
Debug="true"
></MM:DataSet>
<MM:DataSet
id="editrs"
runat="Server"
IsStoredProcedure="false"
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_STRING_conn"] %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_DATABASETYPE_conn"] %>'
CommandText='<%# "SELECT * FROM dbo.cuku_cat WHERE id = ?" %>'
Debug="true"
>
<Parameters>
<Parameter Name="@id" Value='<%# ((Request.QueryString["id"] != null) && (Request.QueryString["id"].Length > 0)) ? Request.QueryString["id"] : "" %>' Type="Integer" />
</Parameters>
</MM:DataSet>
<MM:DataSet
id="pds"
runat="Server"
IsStoredProcedure="false"
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_STRING_conn"] %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_DATABASETYPE_conn"] %>'
CommandText='<%# "SELECT * FROM dbo.cuku_products,dbo.cuku_cat WHERE dbo.cuku_cat.id = dbo.cuku_products.catid ORDER BY dbo.cuku_products.id desc" %>'
CurrentPage='<%# ((Request.QueryString["pds_CurrentPage"] != null) && (Request.QueryString["pds_CurrentPage"].Length > 0)) ? Int32.Parse(Request.QueryString["pds_CurrentPage"]) : 0 %>'
PageSize="20"
Debug="true"
></MM:DataSet>
<MM:DataSet
id="editpds"
runat="Server"
IsStoredProcedure="false"
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_STRING_conn"] %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_DATABASETYPE_conn"] %>'
CommandText='<%# "SELECT * FROM dbo.cuku_products WHERE id = ?" %>'
Expression='<%# Myac=="add" %>'
Debug="true"
>
<Parameters>
<Parameter Name="@id" Value='<%# ((Request.QueryString["id"] != null) && (Request.QueryString["id"].Length > 0)) ? Request.QueryString["id"] : "" %>' Type="Integer" /> </Parameters>
</MM:DataSet>
<MM:PageBind runat="server" PostBackBind="true" />
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>产品管理</title>
<link href="images/admin.css" rel="stylesheet" type="text/css" />
</head>
<body>
<script>
function del(ids,what)
{
if(confirm("你确定要删除吗?")){
window.location.href="?act=del&do="+what+"&id="+ids;
}else{
return
}
}
</script>
<script runat="server">
private string myac;
public string Myac
{
get { return this.myac; }
set { this.myac = value; }
}
public string Checked(string chkstr)
{
return chkstr=="True" ? "checked=\"checked\"":"";
}
public void Page_Load(Object Src, EventArgs E)
{
if (Request.QueryString["act"]== null)
{
Myac="go";
}
else
{
Myac=Request.QueryString["act"].Trim();
}
}
</script>
<mm:if runat="server" expression='<%# Myac=="go" %>'>
<contentstemplate>
<table width="600" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td height="25" colspan="5" background="images/bg_lead.png"> 产品管理</td>
</tr>
<tr>
<td width="6%" align="center" bgcolor="#CCEAFA">编号</td>
<td width="25%" align="center" bgcolor="#CCEAFA">产品名称</td>
<td width="23%" align="center" bgcolor="#CCEAFA">分类</td>
<td width="23%" align="center" bgcolor="#CCEAFA">属性</td>
<td width="23%" align="center" bgcolor="#CCEAFA">管理</td>
</tr>
<ASP:Repeater runat="server" DataSource='<%# pds.DefaultView %>'>
<ItemTemplate>
<tr>
<td height="21" align="center" bgcolor="#CCEAFA"><%# pds.FieldValue("id", Container) %></td>
<td bgcolor="#CCEAFA"><%# pds.FieldValue("prodoucts", Container) %></td>
<td bgcolor="#CCEAFA"><%# pds.FieldValue("catname", Container) %></td>
<td bgcolor="#CCEAFA"><%# pds.FieldValue("isnew", Container) %><%# pds.FieldValue("recom", Container) %><%# pds.FieldValue("isnew", Container) %></td>
<td align="center" bgcolor="#CCEAFA"><a href="?act=add&id=<%# pds.FieldValue("id", Container) %>">修改</a> <a href="javascript:del('<%# pds.FieldValue("id", Container) %>','pro')">删除</a></td>
</tr>
</ItemTemplate>
</ASP:Repeater>
<tr>
<td colspan="5" align="center" bgcolor="#CCEAFA">首页 上一页 下一页 末页</td>
</tr>
</table>
</contentstemplate>
</mm:if>
<mm:if runat="server" expression='<%# Myac=="add" %>' >
<contentstemplate>
<form action="" method='POST' enctype="multipart/form-data" name='form1' id="form1" runat='server'>
<table width="600" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td height="27" colspan="2" background="images/bg_lead.png" bgcolor="#EFF9FE"> 修改/添加商品</td>
</tr>
<tr>
<td width="121" height="23" align="center" bgcolor="#CCEAFA">产品名称</td>
<td width="479" bgcolor="#CCEAFA"><label>
<input name="prodoucts" type="text" id="prodoucts" value="<%# editpds.FieldValue("prodoucts", Container) %>" />
<input name="id" type="hidden" id="id" value="<%# editpds.FieldValue("id", Container) %>" />
</label></td>
</tr>
<tr>
<td height="23" align="center" bgcolor="#CCEAFA">产品分类</td>
<td bgcolor="#CCEAFA">
<select name="catid" id="catid">
<ASP:Repeater runat="server" DataSource='<%# rs.DefaultView %>'>
<ItemTemplate>
<option value="<%# rs.FieldValue("id", Container) %>"><%# rs.FieldValue("catname", Container) %></option>
</ItemTemplate>
</ASP:Repeater>
</select>
</td>
</tr>
<tr>
<td height="23" align="center" bgcolor="#CCEAFA">商品图片</td>
<td bgcolor="#CCEAFA"><label>
<input name="pic" type="text" id="pic" value="<%# editpds.FieldValue("pic", Container) %>" />
</label></td>
</tr>
<tr>
<td height="23" align="center" bgcolor="#CCEAFA">上传图片</td>
<td bgcolor="#CCEAFA"><label>
<input type="file" name="fileField" id="fileField" />
</label></td>
</tr>
<tr>
<td height="23" align="center" bgcolor="#CCEAFA">说 明</td>
<td bgcolor="#CCEAFA"><input name="cont" type="text" id="cont" value="<%# editpds.FieldValue("cont", Container) %>" /></td>
</tr>
<tr>
<td height="23" align="center" bgcolor="#CCEAFA">商品属性</td>
<td bgcolor="#CCEAFA"><label>
<input name="isnew" type="checkbox" id="isnew" value="true" <%# Checked(editpds.FieldValue("isnew", Container))%> />
新商品
<input name="recom" type="checkbox" id="recom" value="true" <%# Checked(editpds.FieldValue("recom", Container))%>/>
推荐
<input name="uptop" type="checkbox" id="uptop" value="true" <%# Checked(editpds.FieldValue("uptop", Container))%>/>
置顶
</label></td>
</tr>
<tr>
<td height="23" align="center" bgcolor="#CCEAFA">介 绍</td>
<td bgcolor="#CCEAFA"><label>
<textarea name="content" id="content" cols="45" rows="5"><%# editpds.FieldValue("content", Container) %></textarea>
</label></td>
</tr>
<tr>
<td height="23" align="center" bgcolor="#CCEAFA"> </td>
<td bgcolor="#CCEAFA"><label for="button"></label>
<input type="submit" name="button" id="button" value="提交" />
<label>
<input type="reset" name="button2" id="button2" value="重设" />
<input name="button3" type="button" id="button3" onclick="history.go(-1)" value="返回" />
</label></td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="form1" />
<input type="hidden" name="MM_update" value="form1" />
</form>
</contentstemplate>
</mm:if>
<mm:if runat="server" expression='<%# Myac=="class" %>' >
<contentstemplate>
<table width="387" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td height="25" colspan="5" align="center" background="images/bg_lead.png"> 分类列表</td>
</tr>
<tr>
<td width="27" height="23" align="center" bgcolor="#CCEAFA">编号</td>
<td width="79" align="center" bgcolor="#CCEAFA">分类名称</td>
<td width="30" align="center" bgcolor="#CCEAFA">顺序</td>
<td width="175" align="center" bgcolor="#CCEAFA">说明</td>
<td width="60" align="center" bgcolor="#CCEAFA">管理</td>
</tr>
<ASP:Repeater runat="server" DataSource='<%# rs.DefaultView %>'>
<ItemTemplate>
<tr>
<td height="23" align="center" bgcolor="#CCEAFA"> <%# rs.FieldValue("id", Container) %></td>
<td align="center" bgcolor="#CCEAFA"><%# rs.FieldValue("catname", Container) %></td>
<td align="center" bgcolor="#CCEAFA"><%# rs.FieldValue("catlist", Container) %></td>
<td bgcolor="#CCEAFA"><%# rs.FieldValue("catcont", Container) %></td>
<td bgcolor="#CCEAFA"><a href="?act=class&id=<%# rs.FieldValue("id", Container) %>">修改</a> <a href="javascript:del('<%# rs.FieldValue("id", Container) %>','class');">删除</a></td>
</tr>
</ItemTemplate>
</ASP:Repeater>
</table>
<form runat='server' id="form2" name='form2' method='POST' action="">
<table width="387" border="0" align="center" cellpadding="3" cellspacing="1">
<tr>
<td height="25" colspan="2" background="images/bg_lead.png"> 产品分类添加</td>
</tr>
<tr>
<td width="100" align="center">分类名称</td>
<td width="272"><label>
<input name="catname" type="text" id="catname" value="<%# editrs.FieldValue("catname", Container) %>" />
<input name="id" type="hidden" id="id" value="<%# editrs.FieldValue("id", Container) %>" />
</label></td>
</tr>
<tr>
<td align="center">分类顺序</td>
<td><input name="catlist" type="text" id="catlist" value="<%# editrs.FieldValue("catlist", Container) %>" /></td>
</tr>
<tr>
<td align="center">分类说明</td>
<td><input name="catcont" type="text" id="catcont" value="<%# editrs.FieldValue("catcont", Container) %>" /></td>
</tr>
<tr>
<td align="center"> </td>
<td><label>
<input type="submit" name="button4" id="button4" value="提交" />
<input type="reset" name="button5" id="button5" value="重置" />
<input type="button" name="button6" id="button6" value="返回" />
</label></td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="form2" />
<input type="hidden" name="MM_update" value="form2" />
</form>
</contentstemplate>
</mm:if>
</body>
</html>
<%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls" Assembly="DreamweaverCtrls,version=1.0.0.0,publicKeyToken=836f606ede05d46a,culture=neutral" %>
<MM:Insert
runat="server"
CommandText='<%# "INSERT INTO dbo.cuku_cat (catname, catlist, catcont) VALUES (?, ?, ?)" %>'
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_STRING_conn"] %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_DATABASETYPE_conn"] %>'
Expression='<%# Request.Form["MM_insert"] == "form2" && Request.Form["id"]=="" && Request.Form["catname"]!="" %>'
CreateDataSet="false"
SuccessURL='<%# "adminproducts.aspx?act=class" %>'
FailureURL='<%# "adminproducts.aspx?act=class" %>'
Debug="true"
>
<Parameters>
<Parameter Name="@catname" Value='<%# ((Request.Form["catname"] != null) && (Request.Form["catname"].Length > 0)) ? Request.Form["catname"] : "" %>' Type="VarChar" />
<Parameter Name="@catlist" Value='<%# ((Request.Form["catlist"] != null) && (Request.Form["catlist"].Length > 0)) ? Request.Form["catlist"] : "" %>' Type="Integer" />
<Parameter Name="@catcont" Value='<%# ((Request.Form["catcont"] != null) && (Request.Form["catcont"].Length > 0)) ? Request.Form["catcont"] : "" %>' Type="VarChar" />
</Parameters>
</MM:Insert>
<MM:Update
runat="server"
CommandText='<%# "UPDATE dbo.cuku_cat SET catcont=?, catlist=?, catname=? WHERE id=?" %>'
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_STRING_conn"] %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_DATABASETYPE_conn"] %>'
Expression='<%# Request.Form["MM_update"] == "form2" && Request.Form["id"]!="" %>'
CreateDataSet="false"
SuccessURL='<%# "adminproducts.aspx?act=class" %>'
Debug="true"
>
<Parameters>
<Parameter Name="@catcont" Value='<%# ((Request.Form["catcont"] != null) && (Request.Form["catcont"].Length > 0)) ? Request.Form["catcont"] : "" %>' Type="VarChar" />
<Parameter Name="@catlist" Value='<%# ((Request.Form["catlist"] != null) && (Request.Form["catlist"].Length > 0)) ? Request.Form["catlist"] : "" %>' Type="Integer" />
<Parameter Name="@catname" Value='<%# ((Request.Form["catname"] != null) && (Request.Form["catname"].Length > 0)) ? Request.Form["catname"] : "" %>' Type="VarChar" />
<Parameter Name="@id" Value='<%# ((Request.Form["id"] != null) && (Request.Form["id"].Length > 0)) ? Request.Form["id"] : "" %>' Type="Integer" />
</Parameters>
</MM:Update>
<MM:Delete
runat="server"
CommandText='<%# "DELETE FROM dbo.cuku_cat WHERE id=?" %>'
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_STRING_conn"] %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_DATABASETYPE_conn"] %>'
Expression='<%# ((Request.QueryString["act"] == "del") && (Request.QueryString["do"]=="class")) %>'
CreateDataSet="false"
SuccessURL='<%# "adminproducts.aspx?act=class" %>'
FailureURL='<%# "adminproducts.aspx?act=class" %>'
Debug="true"
><Parameters>
<Parameter Name="@id" Value='<%# ((Request.QueryString["id"] != null) && (Request.QueryString["id"].Length > 0)) ? Request.QueryString["id"] : "" %>' Type="Integer" />
</Parameters>
</MM:Delete>
<!--插入产品-->
<MM:Insert
runat="server"
CommandText='<%# "INSERT INTO dbo.cuku_products (prodoucts, catid, content, recom, uptop, isnew, cont, pic) VALUES (?, ?, ?, ?, ?, ?, ?, ?)" %>'
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_STRING_conn"] %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_DATABASETYPE_conn"] %>'
Expression='<%# Request.Form["MM_insert"] == "form1" && Request.Form["id"].Trim()=="" %>'
CreateDataSet="false"
SuccessURL='<%# "adminproducts.aspx" %>'
FailureURL='<%# "adminproducts.aspx?act=add" %>'
Debug="true"
><Parameters>
<Parameter Name="@prodoucts" Value='<%# ((Request.Form["prodoucts"] != null) && (Request.Form["prodoucts"].Length > 0)) ? Request.Form["prodoucts"] : "" %>' Type="VarChar" />
<Parameter Name="@catid" Value='<%# ((Request.Form["catid"] != null) && (Request.Form["catid"].Length > 0)) ? Request.Form["catid"] : "" %>' Type="Integer" />
<Parameter Name="@content" Value='<%# ((Request.Form["content"] != null) && (Request.Form["content"].Length > 0)) ? Request.Form["content"] : "" %>' Type="VarChar" />
<Parameter Name="@recom" Value='<%# ((Request.Form["recom"] != null) && (Request.Form["recom"].Length > 0)) ? Request.Form["recom"] : "" %>' Type="Boolean" />
<Parameter Name="@uptop" Value='<%# ((Request.Form["uptop"] != null) && (Request.Form["uptop"].Length > 0)) ? Request.Form["uptop"] : "" %>' Type="Boolean" />
<Parameter Name="@isnew" Value='<%# ((Request.Form["isnew"] != null) && (Request.Form["isnew"].Length > 0)) ? Request.Form["isnew"] : "" %>' Type="Boolean" />
<Parameter Name="@cont" Value='<%# ((Request.Form["cont"] != null) && (Request.Form["cont"].Length > 0)) ? Request.Form["cont"] : "" %>' Type="VarChar" />
<Parameter Name="@pic" Value='<%# ((Request.Form["pic"] != null) && (Request.Form["pic"].Length > 0)) ? Request.Form["pic"] : "" %>' Type="VarChar" />
</Parameters>
</MM:Insert>
<MM:Update
runat="server"
CommandText='<%# "UPDATE dbo.cuku_products SET cont=?, content=?, isnew=?, recom=?, catid=?, pic=?, prodoucts=?, uptop=? WHERE id=?" %>'
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_STRING_conn"] %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_DATABASETYPE_conn"] %>'
Expression='<%# Request.Form["MM_update"] == "form1" && Request.Form["id"].Trim()!="" %>'
CreateDataSet="false"
SuccessURL='<%# "adminproducts.aspx" %>'
Debug="true"
>
<Parameters>
<Parameter Name="@cont" Value='<%# ((Request.Form["cont"] != null) && (Request.Form["cont"].Length > 0)) ? Request.Form["cont"] : "" %>' Type="VarChar" />
<Parameter Name="@content" Value='<%# ((Request.Form["content"] != null) && (Request.Form["content"].Length > 0)) ? Request.Form["content"] : "" %>' Type="VarChar" />
<Parameter Name="@isnew" Value='<%# ((Request.Form["isnew"] != null) && (Request.Form["isnew"].Length > 0)) ? Request.Form["isnew"] : "" %>' Type="Boolean" />
<Parameter Name="@recom" Value='<%# ((Request.Form["recom"] != null) && (Request.Form["recom"].Length > 0)) ? Request.Form["recom"] : "" %>' Type="Boolean" />
<Parameter Name="@catid" Value='<%# ((Request.Form["catid"] != null) && (Request.Form["catid"].Length > 0)) ? Request.Form["catid"] : "" %>' Type="Integer" />
<Parameter Name="@pic" Value='<%# ((Request.Form["pic"] != null) && (Request.Form["pic"].Length > 0)) ? Request.Form["pic"] : "" %>' Type="VarChar" />
<Parameter Name="@prodoucts" Value='<%# ((Request.Form["prodoucts"] != null) && (Request.Form["prodoucts"].Length > 0)) ? Request.Form["prodoucts"] : "" %>' Type="VarChar" />
<Parameter Name="@uptop" Value='<%# ((Request.Form["uptop"] != null) && (Request.Form["uptop"].Length > 0)) ? Request.Form["uptop"] : "" %>' Type="Boolean" />
<Parameter Name="@id" Value='<%# ((Request.Form["id"] != null) && (Request.Form["id"].Length > 0)) ? Request.Form["id"] : "" %>' Type="Integer" />
</Parameters>
</MM:Update>
<MM:DataSet
id="rs"
runat="Server"
IsStoredProcedure="false"
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_STRING_conn"] %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_DATABASETYPE_conn"] %>'
CommandText='<%# "SELECT * FROM dbo.cuku_cat ORDER BY id DESC" %>'
Debug="true"
></MM:DataSet>
<MM:DataSet
id="editrs"
runat="Server"
IsStoredProcedure="false"
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_STRING_conn"] %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_DATABASETYPE_conn"] %>'
CommandText='<%# "SELECT * FROM dbo.cuku_cat WHERE id = ?" %>'
Debug="true"
>
<Parameters>
<Parameter Name="@id" Value='<%# ((Request.QueryString["id"] != null) && (Request.QueryString["id"].Length > 0)) ? Request.QueryString["id"] : "" %>' Type="Integer" />
</Parameters>
</MM:DataSet>
<MM:DataSet
id="pds"
runat="Server"
IsStoredProcedure="false"
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_STRING_conn"] %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_DATABASETYPE_conn"] %>'
CommandText='<%# "SELECT * FROM dbo.cuku_products,dbo.cuku_cat WHERE dbo.cuku_cat.id = dbo.cuku_products.catid ORDER BY dbo.cuku_products.id desc" %>'
CurrentPage='<%# ((Request.QueryString["pds_CurrentPage"] != null) && (Request.QueryString["pds_CurrentPage"].Length > 0)) ? Int32.Parse(Request.QueryString["pds_CurrentPage"]) : 0 %>'
PageSize="20"
Debug="true"
></MM:DataSet>
<MM:DataSet
id="editpds"
runat="Server"
IsStoredProcedure="false"
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_STRING_conn"] %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_DATABASETYPE_conn"] %>'
CommandText='<%# "SELECT * FROM dbo.cuku_products WHERE id = ?" %>'
Expression='<%# Myac=="add" %>'
Debug="true"
>
<Parameters>
<Parameter Name="@id" Value='<%# ((Request.QueryString["id"] != null) && (Request.QueryString["id"].Length > 0)) ? Request.QueryString["id"] : "" %>' Type="Integer" /> </Parameters>
</MM:DataSet>
<MM:PageBind runat="server" PostBackBind="true" />
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>产品管理</title>
<link href="images/admin.css" rel="stylesheet" type="text/css" />
</head>
<body>
<script>
function del(ids,what)
{
if(confirm("你确定要删除吗?")){
window.location.href="?act=del&do="+what+"&id="+ids;
}else{
return
}
}
</script>
<script runat="server">
private string myac;
public string Myac
{
get { return this.myac; }
set { this.myac = value; }
}
public string Checked(string chkstr)
{
return chkstr=="True" ? "checked=\"checked\"":"";
}
public void Page_Load(Object Src, EventArgs E)
{
if (Request.QueryString["act"]== null)
{
Myac="go";
}
else
{
Myac=Request.QueryString["act"].Trim();
}
}
</script>
<mm:if runat="server" expression='<%# Myac=="go" %>'>
<contentstemplate>
<table width="600" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td height="25" colspan="5" background="images/bg_lead.png"> 产品管理</td>
</tr>
<tr>
<td width="6%" align="center" bgcolor="#CCEAFA">编号</td>
<td width="25%" align="center" bgcolor="#CCEAFA">产品名称</td>
<td width="23%" align="center" bgcolor="#CCEAFA">分类</td>
<td width="23%" align="center" bgcolor="#CCEAFA">属性</td>
<td width="23%" align="center" bgcolor="#CCEAFA">管理</td>
</tr>
<ASP:Repeater runat="server" DataSource='<%# pds.DefaultView %>'>
<ItemTemplate>
<tr>
<td height="21" align="center" bgcolor="#CCEAFA"><%# pds.FieldValue("id", Container) %></td>
<td bgcolor="#CCEAFA"><%# pds.FieldValue("prodoucts", Container) %></td>
<td bgcolor="#CCEAFA"><%# pds.FieldValue("catname", Container) %></td>
<td bgcolor="#CCEAFA"><%# pds.FieldValue("isnew", Container) %><%# pds.FieldValue("recom", Container) %><%# pds.FieldValue("isnew", Container) %></td>
<td align="center" bgcolor="#CCEAFA"><a href="?act=add&id=<%# pds.FieldValue("id", Container) %>">修改</a> <a href="javascript:del('<%# pds.FieldValue("id", Container) %>','pro')">删除</a></td>
</tr>
</ItemTemplate>
</ASP:Repeater>
<tr>
<td colspan="5" align="center" bgcolor="#CCEAFA">首页 上一页 下一页 末页</td>
</tr>
</table>
</contentstemplate>
</mm:if>
<mm:if runat="server" expression='<%# Myac=="add" %>' >
<contentstemplate>
<form action="" method='POST' enctype="multipart/form-data" name='form1' id="form1" runat='server'>
<table width="600" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td height="27" colspan="2" background="images/bg_lead.png" bgcolor="#EFF9FE"> 修改/添加商品</td>
</tr>
<tr>
<td width="121" height="23" align="center" bgcolor="#CCEAFA">产品名称</td>
<td width="479" bgcolor="#CCEAFA"><label>
<input name="prodoucts" type="text" id="prodoucts" value="<%# editpds.FieldValue("prodoucts", Container) %>" />
<input name="id" type="hidden" id="id" value="<%# editpds.FieldValue("id", Container) %>" />
</label></td>
</tr>
<tr>
<td height="23" align="center" bgcolor="#CCEAFA">产品分类</td>
<td bgcolor="#CCEAFA">
<select name="catid" id="catid">
<ASP:Repeater runat="server" DataSource='<%# rs.DefaultView %>'>
<ItemTemplate>
<option value="<%# rs.FieldValue("id", Container) %>"><%# rs.FieldValue("catname", Container) %></option>
</ItemTemplate>
</ASP:Repeater>
</select>
</td>
</tr>
<tr>
<td height="23" align="center" bgcolor="#CCEAFA">商品图片</td>
<td bgcolor="#CCEAFA"><label>
<input name="pic" type="text" id="pic" value="<%# editpds.FieldValue("pic", Container) %>" />
</label></td>
</tr>
<tr>
<td height="23" align="center" bgcolor="#CCEAFA">上传图片</td>
<td bgcolor="#CCEAFA"><label>
<input type="file" name="fileField" id="fileField" />
</label></td>
</tr>
<tr>
<td height="23" align="center" bgcolor="#CCEAFA">说 明</td>
<td bgcolor="#CCEAFA"><input name="cont" type="text" id="cont" value="<%# editpds.FieldValue("cont", Container) %>" /></td>
</tr>
<tr>
<td height="23" align="center" bgcolor="#CCEAFA">商品属性</td>
<td bgcolor="#CCEAFA"><label>
<input name="isnew" type="checkbox" id="isnew" value="true" <%# Checked(editpds.FieldValue("isnew", Container))%> />
新商品
<input name="recom" type="checkbox" id="recom" value="true" <%# Checked(editpds.FieldValue("recom", Container))%>/>
推荐
<input name="uptop" type="checkbox" id="uptop" value="true" <%# Checked(editpds.FieldValue("uptop", Container))%>/>
置顶
</label></td>
</tr>
<tr>
<td height="23" align="center" bgcolor="#CCEAFA">介 绍</td>
<td bgcolor="#CCEAFA"><label>
<textarea name="content" id="content" cols="45" rows="5"><%# editpds.FieldValue("content", Container) %></textarea>
</label></td>
</tr>
<tr>
<td height="23" align="center" bgcolor="#CCEAFA"> </td>
<td bgcolor="#CCEAFA"><label for="button"></label>
<input type="submit" name="button" id="button" value="提交" />
<label>
<input type="reset" name="button2" id="button2" value="重设" />
<input name="button3" type="button" id="button3" onclick="history.go(-1)" value="返回" />
</label></td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="form1" />
<input type="hidden" name="MM_update" value="form1" />
</form>
</contentstemplate>
</mm:if>
<mm:if runat="server" expression='<%# Myac=="class" %>' >
<contentstemplate>
<table width="387" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td height="25" colspan="5" align="center" background="images/bg_lead.png"> 分类列表</td>
</tr>
<tr>
<td width="27" height="23" align="center" bgcolor="#CCEAFA">编号</td>
<td width="79" align="center" bgcolor="#CCEAFA">分类名称</td>
<td width="30" align="center" bgcolor="#CCEAFA">顺序</td>
<td width="175" align="center" bgcolor="#CCEAFA">说明</td>
<td width="60" align="center" bgcolor="#CCEAFA">管理</td>
</tr>
<ASP:Repeater runat="server" DataSource='<%# rs.DefaultView %>'>
<ItemTemplate>
<tr>
<td height="23" align="center" bgcolor="#CCEAFA"> <%# rs.FieldValue("id", Container) %></td>
<td align="center" bgcolor="#CCEAFA"><%# rs.FieldValue("catname", Container) %></td>
<td align="center" bgcolor="#CCEAFA"><%# rs.FieldValue("catlist", Container) %></td>
<td bgcolor="#CCEAFA"><%# rs.FieldValue("catcont", Container) %></td>
<td bgcolor="#CCEAFA"><a href="?act=class&id=<%# rs.FieldValue("id", Container) %>">修改</a> <a href="javascript:del('<%# rs.FieldValue("id", Container) %>','class');">删除</a></td>
</tr>
</ItemTemplate>
</ASP:Repeater>
</table>
<form runat='server' id="form2" name='form2' method='POST' action="">
<table width="387" border="0" align="center" cellpadding="3" cellspacing="1">
<tr>
<td height="25" colspan="2" background="images/bg_lead.png"> 产品分类添加</td>
</tr>
<tr>
<td width="100" align="center">分类名称</td>
<td width="272"><label>
<input name="catname" type="text" id="catname" value="<%# editrs.FieldValue("catname", Container) %>" />
<input name="id" type="hidden" id="id" value="<%# editrs.FieldValue("id", Container) %>" />
</label></td>
</tr>
<tr>
<td align="center">分类顺序</td>
<td><input name="catlist" type="text" id="catlist" value="<%# editrs.FieldValue("catlist", Container) %>" /></td>
</tr>
<tr>
<td align="center">分类说明</td>
<td><input name="catcont" type="text" id="catcont" value="<%# editrs.FieldValue("catcont", Container) %>" /></td>
</tr>
<tr>
<td align="center"> </td>
<td><label>
<input type="submit" name="button4" id="button4" value="提交" />
<input type="reset" name="button5" id="button5" value="重置" />
<input type="button" name="button6" id="button6" value="返回" />
</label></td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="form2" />
<input type="hidden" name="MM_update" value="form2" />
</form>
</contentstemplate>
</mm:if>
</body>
</html>
jquery 更新到1.2.4修復的bug52個
[
2008/05/20 17:06 | by Else ]
2008/05/20 17:06 | by Else ]
1.2.4的下載地址
http://jquery.com/
http://jquery.com/
引用
Download jQuery 1.2.4 (15kb, Minified and Gzipped)
Great for production use.
Download jQuery 1.2.4 (95kb, Uncompressed)
Great for testing, learning and development.
Download jQuery 1.2.4 (29kb, Packed)
For those that can't Gzip their JavaScript.
jQuery 1.2.4 Release Notes
What was changed in the release.
Great for production use.
Download jQuery 1.2.4 (95kb, Uncompressed)
Great for testing, learning and development.
Download jQuery 1.2.4 (29kb, Packed)
For those that can't Gzip their JavaScript.
jQuery 1.2.4 Release Notes
What was changed in the release.
c#.net 的一个显示记录!
[
2008/05/20 09:26 | by Else ]
2008/05/20 09:26 | by Else ]
昨天晚上dw坏了,做了一个简单的测试,没有做出来,后来想重新安装,没有想到碰到了一个坏的dw,安装时间超过了我的极限,所以今天来到公司,把这个放出来,
<%@ Page Language="C#" ContentType="text/html" ResponseEncoding="utf-8" %>
<%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls" Assembly="DreamweaverCtrls,version=1.0.0.0,publicKeyToken=836f606ede05d46a,culture=neutral" %>
<MM:DataSet
id="DataSet1"
runat="Server"
IsStoredProcedure="false"
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_STRING_conn"] %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_DATABASETYPE_conn"] %>'
CommandText='<%# "SELECT * FROM dbo.em" %>'
Debug="true" PageSize="10" CurrentPage='<%# ((Request.QueryString["DataSet1_CurrentPage"] != null) && (Request.QueryString["DataSet1_CurrentPage"].Length > 0)) ? Int32.Parse(Request.QueryString["DataSet1_CurrentPage"]) : 0 %>'
></MM:DataSet>
<MM:PageBind runat="server" PostBackBind="true" />
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<table width="665" border="1">
<tr>
<td>id</td>
<td>password</td>
<td>name</td>
<td>emal</td>
<td>cp_num</td>
</tr>
<ASP:Repeater runat="server" DataSource='<%# DataSet1.DefaultView %>'>
<ItemTemplate>
<tr>
<td><%# DataSet1.FieldValue("ID", Container) %></td>
<td><%# DataSet1.FieldValue("p", Container) %></td>
<td><%# DataSet1.FieldValue("n", Container) %></td>
<td><%# DataSet1.FieldValue("e", Container) %></td>
<td><%# DataSet1.FieldValue("c", Container) %></td>
</tr>
</ItemTemplate>
</ASP:Repeater>
<tr>
<td colspan="5" align="center"><a href="<%# Request.ServerVariables["SCRIPT_NAME"] %>?DataSet1_currentPage=0">首页</a> <a href="<%# Request.ServerVariables["SCRIPT_NAME"] %>?DataSet1_currentPage=<%# Math.Max(DataSet1.CurrentPage - 1, 0) %>">上一页</a> <a href="<%# Request.ServerVariables["SCRIPT_NAME"] %>?DataSet1_currentPage=<%# Math.Min(DataSet1.CurrentPage + 1, DataSet1.LastPage) %>">下一页</a> <a href="<%# Request.ServerVariables["SCRIPT_NAME"] %>?DataSet1_currentPage=<%# DataSet1.LastPage %>">末页</a></td>
</tr>
</table>
</body>
</html>
<%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls" Assembly="DreamweaverCtrls,version=1.0.0.0,publicKeyToken=836f606ede05d46a,culture=neutral" %>
<MM:DataSet
id="DataSet1"
runat="Server"
IsStoredProcedure="false"
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_STRING_conn"] %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_DATABASETYPE_conn"] %>'
CommandText='<%# "SELECT * FROM dbo.em" %>'
Debug="true" PageSize="10" CurrentPage='<%# ((Request.QueryString["DataSet1_CurrentPage"] != null) && (Request.QueryString["DataSet1_CurrentPage"].Length > 0)) ? Int32.Parse(Request.QueryString["DataSet1_CurrentPage"]) : 0 %>'
></MM:DataSet>
<MM:PageBind runat="server" PostBackBind="true" />
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<table width="665" border="1">
<tr>
<td>id</td>
<td>password</td>
<td>name</td>
<td>emal</td>
<td>cp_num</td>
</tr>
<ASP:Repeater runat="server" DataSource='<%# DataSet1.DefaultView %>'>
<ItemTemplate>
<tr>
<td><%# DataSet1.FieldValue("ID", Container) %></td>
<td><%# DataSet1.FieldValue("p", Container) %></td>
<td><%# DataSet1.FieldValue("n", Container) %></td>
<td><%# DataSet1.FieldValue("e", Container) %></td>
<td><%# DataSet1.FieldValue("c", Container) %></td>
</tr>
</ItemTemplate>
</ASP:Repeater>
<tr>
<td colspan="5" align="center"><a href="<%# Request.ServerVariables["SCRIPT_NAME"] %>?DataSet1_currentPage=0">首页</a> <a href="<%# Request.ServerVariables["SCRIPT_NAME"] %>?DataSet1_currentPage=<%# Math.Max(DataSet1.CurrentPage - 1, 0) %>">上一页</a> <a href="<%# Request.ServerVariables["SCRIPT_NAME"] %>?DataSet1_currentPage=<%# Math.Min(DataSet1.CurrentPage + 1, DataSet1.LastPage) %>">下一页</a> <a href="<%# Request.ServerVariables["SCRIPT_NAME"] %>?DataSet1_currentPage=<%# DataSet1.LastPage %>">末页</a></td>
</tr>
</table>
</body>
</html>
關於網站灰色的css
[
2008/05/19 13:02 | by Else ]
2008/05/19 13:02 | by Else ]
原來用的
這個css在打開之後占客戶的cpu比較高
這個css只是占用一下,就下來了!所以推薦你用第二個
<style type="text/css">
<!--
*{filter:Gray;}
-->
</style>
<!--
*{filter:Gray;}
-->
</style>
這個css在打開之後占客戶的cpu比較高
<style>
html { filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); }
</style>
html { filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); }
</style>
這個css只是占用一下,就下來了!所以推薦你用第二個
前几天,因为在函数里面定义了变量,而其后在packer的时候老是出错,
于是 今天把那几个变量都发改到程式中!现在ok了,昨天晚上在睡前想到一个什么,当时没有记起来,现在忘记了!
于是 今天把那几个变量都发改到程式中!现在ok了,昨天晚上在睡前想到一个什么,当时没有记起来,现在忘记了!
[codes=vb] sql="select * from tableaaa order by id"
rs.open sql,conn,1,1
dim aitem()
dim ysss()
ccc1=rs.recordcount
redim aitem(ccc1)
redim ysss(ccc1)
ii=1
rs.movefirst
for ii=1 to ccc1
aitem(ii)=rs("item_name")
ysss(ii)=rs("state1")
rs.movenext
next
rs.close[/codes]
rs.open sql,conn,1,1
dim aitem()
dim ysss()
ccc1=rs.recordcount
redim aitem(ccc1)
redim ysss(ccc1)
ii=1
rs.movefirst
for ii=1 to ccc1
aitem(ii)=rs("item_name")
ysss(ii)=rs("state1")
rs.movenext
next
rs.close[/codes]
<% For Each cValue in Request.Form %>
<%=cValue%>
<%=Request.Form(cValue)%>'显示值
<% Next %>
<%=cValue%>
<%=Request.Form(cValue)%>'显示值
<% Next %>
for each x in rs.Fields
strLine= strLine & x.value & chr(9)
next
帮朋友改了点东西,留点代码做纪念!
strLine= strLine & x.value & chr(9)
next
gzip压缩处理js文件
[
2008/05/16 13:23 | by Else ]
2008/05/16 13:23 | by Else ]
我在用firebug测试的时候,如果就用pack版,30K 输出的时间,在900ms 而用pack或是mini版,用php的gzip处理,虽然到了15K,然而在firebug测试的时候,要1.5,s 或是2.3s 这样的值
你们有没有碰到这样的问题吗?
php没有成功,
.htaccess也失败了!
你们有没有碰到这样的问题吗?
php没有成功,
.htaccess也失败了!














