ASP program and Web page separation

Source: Internet
Author: User

<!--#include file= "adoconn.asp"-->
<!--#include file= "kkttemplate.asp"-->
<%
'=========================================
' Function: Web page and program detach, and read data from the database
' Author: wangsdong
' Source: www.aspprogram.cn
' Article for the author original, reproduced please indicate the origin of the article, reserved for
' Person information, thank you for your support!
'=========================================
Dim My_color, Kkt, myname, animal, plant
Set kkt = new Kkttemplate
Kkt.set_file "Hndkkttemp", "templeta/4.html"

Sql= "SELECT * FROM News"
Set rs=conn.execute (SQL)
If rs.eof Then
Else
Kkt.set_block "Hndkkttemp", "Newslist", "a"
Do as not rs.eof
Kkt.set_var "title", RS ("title"), False
Kkt.set_var "id", RS ("id"), False
Kkt.parse "A", "newslist", True
Rs.movenext

Loop
End If
Rs.close

set animal=nothing
Kkt.parse "Out", "hndkkttemp", false
Kkt.p ' out '
%

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.