ASP Functions
Code
Copy code The Code is as follows: Function removehtml (STR)
Dim objregexp, match, strhtml
If isnull (STR) then
STR = ""
End if
Strhtml = Str
Strhtml = Replace (replace (strhtml, vblf, ""), vbcr, ""), vbcrlf ,"")
Set
Let's see a lot of people who need it. Let's share some good things.
CopyCode The Code is as follows: function content_code (STR)
Dim ary_string, I, n, n_pos
Ary_string = Split (STR, "[Code]")
N = ubound (ary_string)
If n Content_code = Str
Exit
1. Javascript random number function math. Random ()
Generate random numbers within a specified range
The math. Random () method has no parameters. 0 ~ is returned ~ Random number between 1. If 0 ~ is to be generated ~ Random between N
Number,
I. Common mistakes made by new users
I saw many posts in the Forum
Code There is a common basic error and the field type is incorrect.
Program It is closely connected to the database. single quotation marks are used for text or time fields of the
I checked a large amount of relevant materials at the beginning and found that many of the methods provided in them were not the same in practice. For simple applications, these materials may be helpful, but they are limited to this, because they
Note: Google provides a set of APIS for us to conveniently implement language translation. For us (Chinese), Chinese and English translations are commonly used. Good English can look at Google Documents:
Jqgrid is an excellent jquery-based DataGrid framework, which is certainly familiar to everyone. There are few ASP-based materials on the Internet. I provide one in JSON format:
, A json class for jqgrid:
Code It seems to have been converted from
Add cache support to the data layer, business logic layer, UI, or output layer. Memory is currently very cheap-therefore, the entire application is intelligently deployed
Program To achieve high performance. Caching can mask many errors. caching is
I. Upload and play audio files Find a third-party control named aspnetpager on the Internet and reference the aspnetpager. dll file to the bin of the project. It can be called directly on the webpage. Reference namespace using telerik. webcontrols;
>
Therefore, an HTML file is saved when each file is uploaded, so that the online preview function can be realized. Main
Code As follows:
Copy code The Code is as follows: using system;
Using system. collections;
Using system. configuration;
Using
Overview
In MVC, the Controller is used to process and respond to user interactions. It selects the View to be used for display and the View data to be transmitted to the View. ASP. net mvc Framework provides two types: IController interface and
Read data from the databaseIn ASP. NET, you can use datareader and dataset to read data from the database. The differences between the two methods are as follows:
To use a dataset object to read data, perform the following five steps:(1) Create a
Overview
In the development of ASP. net mvc complex projects, as the project scale expands, we may need to separate different modules as needed. You can use the "Areas" function provided by the ASP. net mvc Framework to organize projects. For
* Tip 1: Use GLOBAL. ASA for the application layer File
Load the file into an application layer array in GLOBAL. ASA, instead of reading the file on the page by using an ASP file system object.
GLOBAL. ASA can be used to specify event scripts or
Copy codeThe Code is as follows: title = request ("title ")
Title = replace (title, "chr (34 )","""")
In asp, double quotation marks must be changed to two double quotation marks.
Asp replaces single quotes with double quotesSome netizens
ASP. NET implements multi-domain name multi-site shared Session Value
1. Implementation function: You can set which sites can share the Session value, so as to prevent others from using this to access
To implement this function, you must put the
Of course, there are many aspects of website performance optimization. Here we will first talk about the results of these days:
1. the habit of writing code;
The complicated logic also begins with the simplest one. In the process of writing code,
1. IIS Server Error 500
2 error cause: 500 error is generally caused by an error in the source program.
3. Solution: 1. First, set the IE browser tool> Internet option.
2. If you refresh or re-open the 500 error page, the error program will
All the friends who have used software know that the progress bar is an important part of a good software.
Its existence enables users to grasp the program running Progress in time and confirm that the application works normally. However, ASP does
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.