How to implement ASP programming in Delphi

zhaozj2021-02-17  53

How to implement ASP programming in Delphi

As we all know, ASP technology is our main technique in Web programs in Internet / Intranet, which we generally use VBScripts and JavaScripts in ASP applications. However, the scripting language is a non-compiled language. The Web program developed has a congenital security, performing efficiency expansion, so we generally write an ASP executter with advanced languages ​​when developing a web system, and then use scripts The language is used as a connection code to call the ASP executive to perform access. In this regard, since the ASP technology is launched by Microsoft, we generally take advantage of VB or VC, how do Delphi programmers implement? In this regard, the author recently implemented the Web programming of the ASP technology in the Delphi environment, now in the Delphi environment, established a new ACDIVEX DLL project Project1 in the Delphi environment, then through Delphi Active Server Object creates an ASP object that fills in his CoClassName to fill in the name myaspobject. 2. Create a method to be called by the script language through the Type Library, which is the method called by the scripting language. 3, due to the ASP established The object is inherited from TasPObject. We should use the ASP object directly in the method. Now you can fill in the code for our ASP objects as follows: Product; Begin Repsonse.write ('

Your name is: '); Repsonse.write (Request.form.Item [' Name ']); REPSONSE.WRITE (' "); // Read User Name // REPSONSE.WRITE from the page you want

Your job is: '); repsonse.write (Request.form.Item [' Work ']); REPSONSE.WRITE (' '); // Read users from the page you want Work // REPSONSE.WRITE ('

you use the development tool:'); if (Request.form.Item ['delphi']. Count> 0) REPSONSE.WRITE ('delphi'); if (Request. Form.item ['BCB']. Count> 0) REPSONSE.WRITE ('C Builder'); // Determine the development tool used by the user // REPSONSE.WRITE (''); repsonse.write ('

Your identity: '); repsonse.write (REQUEST.FORM.Item [' Identity ']); REPSONSE.WRITE (' '); // Read the user's identity // end; 4 , Compile the program and registered in Delphi as PMYASPOBJE Ct.dll file.

转载请注明原文地址:https://www.9cbs.com/read-30787.html

New Post(0)