Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
289 views
in Technique[技术] by (71.8m points)

c# - Including Views in a Class Library

In a previous question I found out how to create a plugin architecture for MVC. I'm not the whole way down that path yet but I do have a nice way of splitting things up.

One thing that is bugging me though is the intellesense for the View when they are in the Class Library. Developing them in the core MVC project and then copying them across is a pain.

Basically the problem that I'm having is that I don't understand well enough how Visual Studio is dealing with the aspx files. I'm on Beta at the moment, I'm thinking that I might be able to take advantage of explicit view building that comes with RC1.

Any help would be appreciated.

update:

I have all of the finding of views sorted out when it is actually running, its the editing of them in visual studio I'm interested in. Do they have to be in a web type project?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The views can be whereever you like. There's a ViewLocator and you can replace it and put them wherever you like: http://blogs.teamb.com/craigstuntz/2008/07/31/37827/.

You could put them in a binary or in a database if it made you happy.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...