ASP data connection method

MS Access database connection Connect with DSN and no username and password: Set conn = Server.CreateObject ("ADODB. Connection ") Conn.Open "Yourdsnname" %> Connect with DSN with user name and password: Set conn = Server.CreateObject ("ADODB.

Allows users to see your ASP's original code

If you write an ASP program, want to let your user see ASP's raw code, you can use FileSystemObject this object to send out the program original code. Dim strURL strURL = Request.QueryString ("URL") Dim Strdir, strFileName Strdir =

Asp. NET realization Word document online preview function code

using System;Using System.Collections;Using System.Configuration;Using System.Data;Using System.Web;Using System.Web.Security;Using System.Web.UI;Using System.Web.UI.HtmlControls;Using System.Web.UI.WebControls;Using

asp.net 2.0 execution sequence instance code for page events (1/2)

I. Initialization section:1. Constructor: Creates an instance of the page class that initializes the properties of the page class.2.addparsedsubobject function: protected virture void AddParsedSubObject (object obj) Extracts the server

asp.net caching technology and cache implementation method (1/4)

RealizeTo implement the page output cache, simply add a OutputCache directive to the page.As with other page directives, the directive should appear at the top of the ASP Tutorial x page, before any output. It supports five properties (or parameters)

asp.net string intercept function

ASP tutorial. NET string intercept functionThis tutorial first tells you to use the simplest way to intercept a string, and then write a useful program to intercept the data.*/ C#String mystring = "abc";BOOL Test1 = mystring.substring (2, 1).

asp.net find the same notation in the DataTable

ASP tutorial. NET find the same code in the DataTable DataTable dt=...//Data source DataTable Dt1=dt.totable (True, "Gid,did,batch"); if (Dt1.rows.count==dt.rows.count) { No repetition } foreach (DataRow dr in Dt1.rows) { Datarow[] Drs=dt.

ASP Getting Started Tutorial: ASP variable [Variables]

A variable is used to store information.If the variable is a declaration program, you can change the script by any ASP file. If the variable is an internally announced program, it is created and destroyed each time the program executes.Example

ASP beginners must look at the paging program

--- " site template | WEB"I=0sqlmb= "SELECT * from WEBMB ORDER BY id DESC"Call OpendbRs.Open sqlmb,conn,1,1If not rs.eof thenPage=cint (Request.QueryString ("page"))If Page=0 ThenPage=1End IfRs.pagesize=15If not isnumeric (page) or

ASP establishes a connection with an Access database

lt;%Set Dbconnection=server.createobject ("ADODB. CONNECTION ")DBPath = Server.MapPath ("Customer.mdb")DbConnection. Open "Driver={microsoft Access driver (*.mdb)};d bq=" & DBPath Establish a connection with the database, with the same. Sql= "SELECT

ASP Cookie Instance Tutorial

ASP Cookie Instance tutorial, the first time when someone else's website on the tips welcome you to visit this, the second visit will show welcome you back, this start do not understand, it is now known to be a cookie instance, Here's a code that

ASP Clear Method Use instance tutorial

ASP Clear Method Use instance tutorial The clear method clears any buffered HTML output.Note: This method does not explicitly respond to the title, only the body reacts.Note: If response. The buffer is false, and this method will result in a run-

ASP Save Information

If Request.Form ("jobname") = "" Then Response.Write (" ") Response.End End If If request.form ("mane") = "" Then Response.Write (" ") Response.End End If If request.form ("sex") = "" Then Response.Write (" ") Response.End End If If Request.Form

ASP User Login Program

'=====================================================================' Software name: New Cloud Website Management system' Current version: Newcloud Site Management System version 2.1' File name: admin_password.asp' Update Date: 2004-12-20'

ASP URL conversion function

' Function name: Relativepath2rootpath' function: Convert to root path format' Parameter: URL----original URL' return value: converted Url'================================================Function relativepath2rootpath (URL)Dim StempurlStempurl =

ASP Simple User Login

chr

ASP Simple User Login Dim uid,pwdUID =html_encode (Request.Form ("UID"))PWD =html_encode (Request.Form ("pwd"))If uid = "Admin_videa" and pwd= "videa888" ThenSession ("Admin") =uidResponse.Redirect (".. /input.asp ")ElseResponse.Write (" ")Response.

A simple ASP Getting Started tutorial

A simple ASP Getting Started tutorialDim strname,stremail,strhomepage,strcontent,strtable,strdsnStrname=request.form ("name")Stremail=request.form ("email")Strhomepage=request.form ("homepage")Strcontent=request.form

A good paging method, data deletion method (with confirmation and cancellation windows), search for keyword (including spaces) processing-ASP tutorial, data

Keyword = request ("Keyword ")Keyword = replace (Keyword ,"","")Page = Request. QueryString ("page ")SQL = "select * from exam information where exam name like '%" & keyword & "% '"Rs. open SQL, conn, 1, 1Dim page, maxPerPageMaxPerPage = 2' number

Some problems that ASP may encounter when dealing with databases!

Q: Why does my RecordCount always return-1?A: You should use this mode to open the record set for database access:Rs. open strSQL, conn, 1, 1StrSQL is the SQL statement used to operate the database, and conn is the Connection variable used to

Asp.net cache operation code

Asp tutorial. net provides three main forms of cache: Page-level output cache, user control-level output cache (or segment cache), and cache api. The advantage of output cache and fragment cache is that it is very easy to implement. In most cases,

Total Pages: 1800 1 .... 1758 1759 1760 1761 1762 .... 1800 Go to: GO

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.