Currently, a website using ASP requires a lot of image processing. all third-party components cannot meet my requirements. net. therefore, you need to write components by yourself. I chose VB, but I found some information online. they are not complete, or they are too complicated to understand, so they finally chose. net. (mad at C ++ ...)
This is actually not practical, because Asp.net can be used in a. NET environment.
1. Open vs. net. To create a project, select the class library as the template. Here I use C #
2. Change the automatically generated class1.cs to test. CS and modify the corresponding code. Here we will just perform a test first.
3. Write a simple function and return a string.
The Code is as follows:
Using system;
Namespace allinhands
{
/// <Summary>
/// Summary of class1.
/// </Summary>
Public class test
{
Public String getteststring ()
{
Return "this is my test string .";
}
}
}
4. An important step.
Open project properties, and change "register for com InterOP" to "true" in "configuration properties"-> "generate"
5. Generate a project.
Create an ASP file.
<%
Set QQ = server. Createobject ("allinhands. test ")
Response. Write QQ. getteststring ()
Set QQ = nothing
%>
"Allinhands" is your project name, and test is the class name.
Open and output "this is my test string ."
On this basis, we can make other complex components, as long as you want