Use NotePad to Develop ASP. NET web applications

Source: Internet
Author: User
Tags visual studio 2010

First lookArticleTitle: "using notepad to Develop ASP. NET web applicationsProgram", In fact, notepad here is just synonymous with a text editor. It generally refers to commonly used text editors, such as Windows notepad, notepad +, editplus, Vim, ultraedit, and so on.

Some may have doubts and may be surprised to say that it is very convenient and efficient to use Microsoft Visual Studio 2010 for Asp.net application development, is it necessary to use development tools such as NotePad to develop Asp.net.

In fact, there will be some application scenarios for Asp.net development using notepad, And it will often happen when you are 100,000 in a rush.

 

Application Scenario 1:

You have developed a set of Asp.net Web applications for the customer. Now you need to temporarily Add a page at the customer's office site, but the situation is very bad. The customer's office computer does not have Visual Studio installed. What should you do? At this time, you can only use Notepad for development.

 

1. Use notepad to create related files on the new function page. The xpsou. aspx and the corresponding codebehind file xpsou. aspx. CS.

Create a folder, such as xpsou, and store the xpsou. aspx and xpsou. aspx. CS files.

 

2. The general scenario is to use the inherits = "test8.default" command in the first line of the xpsou. aspx file to set the default class in the test8 namespace as the parent class of xpsou. aspx. That is, xpsou. aspx inherits the default class in the test8 command space.

 

3. WriteCode

 

4. At this time, you use http: // www. ***. com/xpsou. aspx to access your new page. You will see an error:

. NET Framework prompts an error. xpsou. aspx (Row 1): Error aspparse: Unable to load type "test8.default ".

Maybe you will think, I am clearly in xpsou. in the first line of the aspx file, use the inherits = "test8.default" command of the page command to set the default class in the test8 namespace to xpsou. why does the aspx parent class prompt?The "test8.default" type cannot be loaded "..

In fact, by decompiling the DLL file generated by xpsou. aspx, you will find that xpsou. aspx has requested the DLL file generated by the xpsou. aspx. CS file during compilation.

Now you know that you must first compile the xpsou. aspx. CS file into a DLL file before compiling xpsou. aspx. In addition, after the xpsou. aspx. CS file is compiled into a DLL file, you must put it under the bin directory, because the directory referenced during xpsou. aspx compilation is exactly the bin directory.

Therefore, you can use the following command to compile xpsou. aspx. CS:

CSC/T: Library/out: "F:/iisroot/xpsou/bin/xpsou. dll" "F:/iisroot/xpsou. aspx. cs"

5. Now you can access your new page through http: // www. ***. com/xpsou. aspx.

In retrospect, the huge ide tool Visual Studio is not used to develop this new page.

 

 

Related Article

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.