Install vs2010
Install vs2010 first. For the installation process, seeArticle:
Http://www.cnblogs.com/ywqu/archive/2010/01/27/1657824.html.Create the first mvc2.0
Program
Create an Asp.net mvc2.0 website program, for example:
Prompt
As an ASP programmer, it is vital to form a set of good programming strategies. It helps us to develop systems that are easy to expand and have clear modules. At the same time, it can greatly improve the speed of task completion. We will discuss
During our normal development process, we often need to insert data into the database. Sometimes we may need to perform many similar operations, such as inserting data to the same table in the database at the same time, insert data in batches.
Batch
1. How to use ASP to determine the virtual physical path of your website
A: Use the mappath method.
The physical path to this virtual website is:
2. How do I know the browser used by the user?
A: Use the request object method.
Strbrowser =
The implementation process is basically to implement the system on the page or space to implement the client callback function. web. UI. icallbackeventhandler interface, that is, two methods: void raisecallbackevent (string eventargument). This is
Many websites have a stenographer to record website visits, which provides administrators with a great deal of convenience to know the operation and access of the website. I have studied a lot of counter programs written in ASP, and found that most
In ASP programs, if our programs are improperly designed, the database may be controlled by others.
The following is a simple code for changing the password of a user:---------------------Username = request ("user_name ")Pwd = request ("PWD
Comprehensive Optimization of ADO
1 Connection
1.1 pooling
In Web applications, many users access the database at the same time, and the object scope in ASP is page-level. That is to say, each page must be connected and disconnected from the
There are many ways to generate WORD Documents Using ASP on the Internet. The most common method is to generate WORD Documents Using word. dot document, and then use ASP. although this method is good, it is very complicated to implement and cannot
The day before yesterday, N had an Access database program that had been made for a long time before, and the program had not been changed. It was good before and suddenly failed.
The error message is as
I. Anti-copy and paste:'Date: 2006-3-6'Author: blue2004'The STR parameter is the original text, and the str1 author is yourself. reslut generates garbled seeds.Function readtocode (STR, str1, result)Dim nameDim I, J, KIf isnull (STR) thenReadtocode =
Add gb2312 and GBK in the following ing table, so there will be no garbled characters. The source code is provided below for a program written by a netizen.
Private Static void loadcharsetmap (){Mapping = new hashtable ();
Mapping. Add ("big5", "big5
Encryption is required for the current web system.Select MD5 as usual (in fact, I have used MD5 ^_^)
Two implementations are found.
/**/////// Use MD5 Encryption////// Input data///Public static string MD5 (string
ASP can quickly execute your dynamic web pages, but you can also compress code and database connections to make them run faster. This is a detailed article on how to streamline code and ASP features for the fastest execution speed. For a dry user,
1:
download the image download TXT
These two download methods are non-pop-up box. They can only open files through IE, rather than reminding users whether to save the file type.
2: the pop-up dialog box prompts you whether to save the file.
I found it online, but it is not bad. Many formats are supported. You only need to put a lable on the page, create a folder named movie for the video file, and add the code: protected void page_load (Object sender, eventargs e) {This. label1.text =
Asp.net MD5 encryption function (C #)
The following method can be used to directly input data and reverse the MD5 encrypted code.
/// /// Use MD5 Encryption/// /// input data /// Public static string MD5 (string sourcein){Md5cryptoserviceprovider
21. Custom Exception Handling
// Custom exception handling classUsing system;Using system. diagnostics;Namespace myappexception{/// /// Application exception handling class inherited from the system exception class applicationexception.///
Function to intercept Chinese characters into one word and English into one word.
If you have any questions, please advise
/// /// Word truncation Function/// /// string /// Number of truncated words ///
Public String splitstring (string
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