Use ASP to build your website News and Publishing (2)

Source: Internet
Author: User
(2) add and manage daily news content
After a news report is submitted, it is submitted to a file named addnew. asp is used to process news content for classification and storage. For display and analysis, the following news content library is read again every time we submit a News Record, in this way, you can check whether news can be successfully added to the database, or delete news content.
Now let's take a look at how addnew. asp completes program processing.
    
<% @ Language = "vbscript" %>
<%
Response. buffer = true
Response. Expires = 0
    
'Save data
Session ("title") = request. form ("title ")
Session ("comment") = request. form ("comment ")
Session ("pic") = request. form ("pic ")
Session ("class_name") = request. form ("class_name ")
Session ("head") = request. form ("head ")
    
'Judge that the passed parameter characters do not meet the requirements
If request. form ("title") = "" then
Response. redirect "delete. asp"
End if
    
If request. form ("comment") = "" then
Response. redirect "delete. asp"
End if
    
If request. form ("class_name") = "" then
Response. redirect "delete. asp"
End if
    
    
Select case request. form ("class_name ")
    
Case "market situation"
Class = 1
Case "IT news"
Class = 2
Case "Guangzhou market"
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.