ASP advanced article Online Management Update (10)

Source: Internet
Author: User

Author: Beach Boy
In the previous section, we introduced the main page of article management, and here the main page just show the relevant connection, if there is no relevant program to execute, then it is only empty connection, and will not show its specific function, and the article online deletion is an indispensable part of the system, although its program is very simple, But it is still necessary for us to introduce.

In ASP, the operation of the database update (update), delete (delete), and other operations, in this system of the deletion of the article is to use the delete to delete the text of the operation, Here is a brief introduction to the main implementation process of this removal program (delete.asp) and detailed annotations:
<%@ language= "VBSCRIPT"%>
<%
"Restrict non-privileged users to delete directly
If Request.Cookies ("Adminok") = "" Then
Response.Redirect "Login.asp"
End If
%>
"Open and establish a database connection
<!--#include file= "conn.asp"-->
<%
Dim sql
Dim rs
Set Rs=server.createobject ("Adodb.recordset")
"Deletes the article for the specified recordset with the article ID returned from the connection
Sql= "Delete from article where articleid=" &request ("ID")
Rs.Open sql,conn,1,1
"Close the database connection
Rs.close
Set rs=nothing
Conn.close
Set conn=nothing
Automatically turn to admin page when delete operation is complete
Response.Redirect "Manage.asp"
%>
Look at the above procedure, you are not how to have such a simple idea. In fact, in the ASP, the database operation and display is very simple, and the ASP is because of this simple ease of use and widely circulated in a variety of Web site construction, this is Microsoft's consistent style. OK, below we will enter the article management another content, is the article on-line revision!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.