[CLOSED] [#505] Mixing MVC and non-MVC Ext v2x

Page 2 of 3 FirstFirst 123 LastLast
  1. #11
    Hi Vladimir.

    First thank you for bearing with us :)

    Before going more into this could you please answer this question
    Do you know if there are any side effects in using Ext.Net.MVC nuget package inside WebForms application?
    Like if I do something like this:
    New Project => choose Web Application => choose Web Forms template => and install nuget packge Ext.NET.MVC
    Will this work?

    Now to your questions.
    This what our coworker followed to achieve this functionality:
    http://www.hanselman.com/blog/Integr...lications.aspx

    And here are break points in our code during request to aspx page, mvc view and back to aspx page.
    Click image for larger version. 

Name:	Ext.NET.MVCInWebForms.png 
Views:	85 
Size:	49.8 KB 
ID:	11911

    Thanks once more for your time

    Milan
  2. #12
    Before going more into this could you please answer this question
    Do you know if there are any side effects in using Ext.Net.MVC nuget package inside WebForms application?
    Like if I do something like this:
    New Project => choose Web Application => choose Web Forms template => and install nuget packge Ext.NET.MVC
    Will this work?
    Yes, it will work correctly. Our Examples Explorer works on Ext.Net.MVC without any problems

    Thanks for the link, i will investigate it. Do you have a template or simple example of such application for testing?
  3. #13
    Hi Vladimir

    It is great that Ext.net.MVC fully supports WebForms makes me trust more in our workaround.

    Sorry but we don't have simple template.
    Maybe you can try with this code although I am not sure if it is same approach as we had based on Hanselman's blog.
    http://www.codeproject.com/Articles/...MVC-in-Harmony

    BTW if you are going to test maybe you can try with using Items instead of Application in MarkAsMVC
    HttpContext.Current.Application["Ext.Net.MVC.IsMVC"] = new Object();
    Thanks
    Milan
    Last edited by Daniil; Jun 09, 2014 at 4:32 AM. Reason: Please use [CODE] tags
  4. #14
  5. #15
    I don't know if this is the same topic but I've wondered about combination of page models myself. In VS 2013, you have the ability to install both webform and mvc into the same virtual host more seamlessly. My guess would be that an application level setting for IsMVC would probably break. I haven't tried but I thought I'd bring up the VS13 scenario.

    http://www.youtube.com/watch?v=tqK6FD45HWM
  6. #16
    Quote Originally Posted by michaeld View Post
    I don't know if this is the same topic but I've wondered about combination of page models myself. In VS 2013, you have the ability to install both webform and mvc into the same virtual host more seamlessly. My guess would be that an application level setting for IsMVC would probably break. I haven't tried but I thought I'd bring up the VS13 scenario.
    Good point.
    I was trying to explain with our project but I think that new project in VS2013 with WebForms and Mvc selected would have same issue.
  7. #17
    Just to confirm the problem.

    I've just created a hybrid WEbForms/MVC app in VS 2013.

    DirectMethods are not registered on a WebForm page anymore after launching an MVC view with
    @Html.X().ResourceManager()
    We should do something with that.
  8. #18
    Is there any progress on this.
    We would prefer if we don't need to use the tweak that I have implemented.
  9. #19
    Unfortunately, no progress yet. We'll let you know if something appears.
  10. #20
    I too would be interested in a solution to this as we are recently hitting the same problem.

    An additional workaround that we have settled on, btw, is to by-pass the DirectMethod and use an ASHX or move the original code in the DirectMethod into a Controller action and invoke using something like:

    Ext.net.DirectMethod.request({
        url: /youraspx/or/mvccontroller
        cleanRequest: true,
        success: anySuccessHandlerHere,
        failure: anyFailureHandlerHere,
        complete: anyCompleteHandlerHere
    });
    (More info in #6. Disable the DirectMethod ClientProxy Creation section of this URL: https://examples2.ext.net/#/Events/D...hods/Overview/ )

    For us, this workaround is good because we actually want to move mostly to MVC Controllers and ASHX and eventually minimize WebForms usage (though it is nice for very quick testing, prototyping and even simple pages where some integrators of our products are more familiar and comfortable with WebForms).

    Hope that helps.
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. [CLOSED] RowExpander mixing up data in IE8
    By HansWapenaar in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Apr 20, 2013, 12:34 PM
  2. [CLOSED] Mixing Container Items and Content
    By sisa in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Aug 23, 2012, 1:05 PM
  3. Replies: 1
    Last Post: Mar 17, 2009, 1:17 AM
  4. EnablePageMethods & Mixing managers..
    By alexandern in forum Open Discussions
    Replies: 2
    Last Post: Jun 06, 2008, 4:53 PM

Posting Permissions