papermodify.aspx
来自「用VB实现」· ASPX 代码 · 共 78 行
ASPX
78 行
<%@ Page Language="VB" ContentType="text/html" %>
<%
If Not Len(Session("AdminID")) > 0 Then
Response.Redirect("login.aspx")
End IF
%>
<%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls" Assembly="DreamweaverCtrls,version=1.0.0.0,publicKeyToken=836f606ede05d46a,culture=neutral" %><MM:Update
runat="server"
CommandText='<%# "UPDATE newsPaper SET npContent=?, npTitle=?, npCatID=? WHERE npID=?" %>'
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_conn") %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETYPE_conn") %>'
Expression='<%# Request.Form("MM_update") = "form1" %>'
CreateDataSet="false"
SuccessURL='<%# "newPaperList.aspx" %>'
Debug="true"
><Parameters>
<Parameter Name="@npContent" Value='<%# IIf((Request.Form("npContent") <> Nothing), Request.Form("npContent"), "") %>' Type="WChar" />
<Parameter Name="@npTitle" Value='<%# IIf((Request.Form("npTitle") <> Nothing), Request.Form("npTitle"), "") %>' Type="WChar" />
<Parameter Name="@npCatID" Value='<%# IIf((Request.Form("npCatID") <> Nothing), Request.Form("npCatID"), "") %>' Type="Integer" />
<Parameter Name="@npID" Value='<%# IIf((Request.Form("npID") <> Nothing), Request.Form("npID"), "") %>' Type="Integer" />
</Parameters>
</MM:Update>
<MM:DataSet
id="dsnewsPaper"
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 newsPaper WHERE npID = ?" %>'
Debug="true"
>
<Parameters>
<Parameter Name="@npID" Value='<%# IIf((Request.QueryString("npID") <> Nothing), Request.QueryString("npID"), "") %>' Type="Integer" />
</Parameters>
</MM:DataSet>
<MM:PageBind runat="server" PostBackBind="true" />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>更新电子报刊内容</title>
<style type="text/css">
<!--
.style1 {font-size: x-large}
-->
</style>
</head>
<body>
<form method="post" name="form1" runat="server">
<table align="center">
<tr valign="baseline">
<td width="51" align="right" nowrap>标题</td>
<td width="352"><asp:textbox Columns="50" id="npTitle" runat="server" text='<%# dsnewsPaper.FieldValue("npTitle", Container) %>' TextMode="SingleLine" />
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">分类</td>
<td><asp:textbox Columns="50" id="npCatID" runat="server" text='<%# dsnewsPaper.FieldValue("npCatID", Container) %>' TextMode="SingleLine" />
</td>
</tr>
<tr valign="baseline">
<td align="right" valign="top" nowrap>内容</td>
<td><asp:textbox id="npContent" text='<%# dsnewsPaper.FieldValue("npContent", Container) %>' TextMode="MultiLine" Columns="50" runat="server" Rows="10" />
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right"> </td>
<td>
<input type="submit" value="更新记录" >
</tr>
</table>
<input type="hidden" name="MM_update" value="form1">
<input type="hidden" name="npID" value="<%# dsnewsPaper.FieldValue("npID", Container) %>">
</form>
<p> </p>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?