呜!!!不会了,,,,很简单的,,,,
<%@ Page Language="VB" ContentType="text/html" %>
<%@ import namespace="system.data"%>
<%@ import namespace="system.data.oledb"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<style type="text/css">
<!--
.t {
border: 1px solid #6699ff;
}
-->
</style>
<body>
<form runat="server">
<asp:datalist ID="datalist1" runat="server" HeaderStyle-BackColor="#006600" HeaderStyle-BorderColor="#00FF00" HeaderStyle-ForeColor="#FFFFFF" OnEditCommand="DE" >
<itemtemplate>
<table width="500" border="0" align="center" cellpadding="3" cellspacing="3" bordercolor="#00417B" class="t">
<tr>
<td width="260"><font size="2">名称: <strong> <font color="#990000">
<%# container.dataitem("mingcheng") %>
</font> </strong> </font></td>
<td width="240"><font size="2">编号: <font color="#CC0000"> <strong>
<%# container.dataitem("bianhao")%>
</strong> </font> </font></td>
</tr>
<tr>
<td rowspan="6">
<div align="center"><font size="2"><img width="100" height="150">
</font><font size="2"> </font><font size="2"> </font></div></td>
<td width="240"><font size="2">类别:
<%# container.dataitem("leibie")%>
</font></td>
</tr>
<tr>
<td width="240"><font size="2">价格:
<%# container.dataitem("jiage")%>
</font></td>
</tr>
<tr>
<td width="240"><font size="2">下载次数:
<%# container.dataitem("xiazaicishu")%>
</font></td>
</tr>
<tr>
<td width="240" height="17"><font size="2">出版社:
<%# container.dataitem("chubanshe")%>
</font></td>
</tr>
<tr>
<td width="240" height="65" valign="top"><font size="2">描述:
<%# container.dataitem("miaosu")%>
</font></td>
</tr>
<tr>
<td width="240" height="17">
<div align="right"><font size="2">
<asp:linkbutton ID="LinkButton_Edit" runat="server" ForeColor="Fuchsia" CommandName="Edit">更改</asp:linkbutton>
</font></div></td>
</tr>
</table>
<br>
</itemtemplate>
<edititemtemplate>
<asp:linkbutton ID="LinkButton_Edit" runat="server" ForeColor="Fuchsia" CommandName="Edit">1111</asp:linkbutton>
</edititemtemplate>
</asp:datalist>
</form>
</body>
</html>
<script runat="server">
Sub Page_Load(Src As Object, E As EventArgs)
If Not IsPostBack Then
B()
End If
End Sub
Sub B()
DIM A as new oledbconnection()
a.connectionstring="provider=microsoft.jet.oledb.4.0;data source=" & server.MapPath("../db1.mdb")
dim b as new OleDbDataAdapter ("select * from soft ",a)
dim c as new dataset()
b.fill(c,"soft")
datalist1.datasource=c
datalist1.databind()
End Sub
Function PanDuan () as boolean
if session("Adm") is nothing then
return false
else
return true
end if
End Function
Sub DE(source As Object, e As DataListCommandEventArgs)
datalist1.EditItemIndex=e.item.itemindex
B()
End Sub
Sub DE(source As Object, e As DataListCommandEventArgs)
datalist1.EditItemIndex=e.item.itemindex
B()
End Sub
</script>
就是不好使点一下更改,,,。进不了编辑部模式。。?
为什么呢??