문제

I'm about to start work on a new mvc3 razor web application. I'd like to use Ext.Net in this application, but ext.net works using a set of compiled user controls that basically wrap the ExtJs UI suite.

There is an ext.net mvc example you can download that uses MVC2 with the default asp.net view engine, it's not pleasant in that it looks very much like old-skool webforms code inside the view, but it works:

Inside a view/master:

  <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
  ...
  <ext:ViewPort ID="ViewPort1" runat="server" Layout="border">
    <Items>
        <ext:Panel ID="Panel1" 
            runat="server"
            ...

Ideally, I want to use MVC3 for my new application, and I'm very keen to move to razor. But obviously, this isn't going to work since I'm rendering user controls in the view.

I don't know if/when the ext.net guys will port the product for mvc view engines, but in the meantime is there a solution.workaround that I could use to achieve the same thing? (I'd rather not use use ExtJS directly - I'm looking to expedite delivery and ext.net seems much easier)

도움이 되었습니까?

해결책

Currently Ext.NET will not work with Razor, although it will function perfectly fine within the default MVC viewengine.

Coincidently, right at this moment, the next release of Ext.NET is being worked on, and it will fully support all MVC view engines. I know that does not help you right now, but might be of interest for a future project.

@jfar - Ext.NET does not depend/rely on ViewState and will render within ASP.NET MVC views.

다른 팁

You simply cannot take controls that depend on ViewState and make them work with MVC without extensive refactoring.

One option is to make non-MVC pages and include them in your app. WebForms and MVC can play nicely together.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top