Analysis on ASP. net mvc Project

Source: Internet
Author: User

ASP. net mvc Project

1. How to split a project without having to combine Code. For example, PetShop MVC is a project by default. If the project is too many and the code is too tired.

Is there a way to do your own work without code? I have nothing to do with one sub-system on my side. I have a bunch of other things that I want them to complete and install them directly at the client.

However, I still have to worry about code integration for existing projects. Sometimes there are few files. Why can they be separated?

A: Yes, of course, but it is not provided by the official team, but it was 2003 of what I did before );

Splitting the project to be compiled into several proj can solve this problem. If it is MVC
◆ Demo. Controllers. U00 -- Public
◆ Demo. Controllers. U01 -- developer 1
◆ Demo. Controllers. U02 -- developer 2

For PetShop, you can use BLL. U01 BLL. U02 and Model. U01 Model. U02.

The WebSite itself does not need to be split for real-time compilation. You can copy your own page to the WebSite and copy the dll as above.

If the WebApplication method is used, you can split it into WebApplication1 WebApplication2 WebApplication3 as long as the compiled dll is in the bin

You can copy all files to a virtual directory. Because WebApplication is also a class library project, ASP. NET searches for classes that match aspx in all the dll files in the bin directory.

However, the above points may lead to more project files in the namespace, but I think you should be able to endure this;

2. Can I convert ASP. NET MVC WebApplication to WebSite? In fact, this problem is useful for the WebSite associated with the previous one. You don't need to compile the alive page, and you don't need to add the file or other code!

A: currently, the mvc website template is not officially provided. the difference section in config is added to the web. config is basically enough. ms may be lazy. Dynamic Data provides site templates. It is actually a thing to use with mvc url rewriting, both WebSite and WebApplication have their own advantages. Different projects can adopt different methods;

3. Can I use the GridView control and other original controls in the ASP. NET MVC project? Can the technical staff of our company tell me no?

A: What technology? Why can't I use it? Do people tell you they don't suggest using it? Are not all asp.net websites? Although MVC has many advantages, sometimes using controls can save a long time, because currently, many project view-Level Party affairs have a maximum of time at the bottom, but there is not much code at the bottom. In this case, hybrid mode can be used. If ViewState is too large to be disabled, mvc is also a waste of time for a single SQL and a grid page.

4. Can I combine the MVP mode or PetShop multi-layer mode in the ASP. NET MVC project?

A: Of course this can be done. You can even use the MVC mixed MVP. For details, see the Demo and multi-layer. In fact, it has nothing to do with MVC. You can call it in Controller; there are indeed some advantages for MVPs when there are two people working on the interface and the background. In the demo, there is a mix of MVPs rather than full MVPs; mvp mode I used blogs. Do you have so many times to play mvp? I got some fun, so I am so anxious to play so many things? You are not afraid of death !!!

5. Can the Controller in the ASP. net mvc project be moved under the Web directory?

A: Of course, you can create a class library project to reference this reference and create a XXXXController under the class library, the mvc Framework will find the Controller in all the dll files in the entire Bin directory to be in The dll Directory, and the Controller can exist in multiple class libraries without repeated names. as I expected ), as for the model, you can move it like this. In fact, views can also move the reference to Question 1. Next time, I will test this problem myself, I just created a project and put the default Controller in it to work;

The format written in the article notepad is like this. It may be too late to read ......

There is no time for today. I have time to explain it to you. Today, if we don't do textures, we just need an attachment!

  1. XML data displayed on the ASP. NET page
  2. What is iframe asp. NET?
  3. ASP. NET lifecycle display
  4. Solve the Problem of ASP. net ajax script errors
  5. ASP. NET Applications

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.