[CLOSED] Migrating to 2: PartialViewResult

  1. #1

    [CLOSED] Migrating to 2: PartialViewResult

    Hi,

    As part of migrating to ext.net 2, I have in my MVC app some code that uses a PartialViewResult to render a view into an existing tab panel. My controller action for ext.net 1 looks like this:

    public ActionResult Manage(string containerId, string installLocationId, string installLocationName)
    {
        PartialViewResult pr = new PartialViewResult(containerId, RenderMode.AddTo, "Scu");
        pr.SingleControl = false;
        pr.ControlToRender = "ScuManage";
        pr.WrapByScriptTag = false;
        pr.ViewData["Title"] = installLocationName;
        pr.ViewData["InstallLocationId"] = installId; 
    
        return pr;
    }
    Please can you advise how to do the equivalent in ext.net 2?

    Thanks

    Matt
    Last edited by Daniil; May 21, 2012 at 9:45 AM. Reason: [CLOSED]
  2. #2
    Hi,

    Generally, it should stay the same. At the first glance.

    What issue are you facing?
  3. #3
    Hi,

    the new PartialViewResult does not contain a constructor that takes 3 arguments - so I can't assign the containerId or RenderMode.

    Also, none of these properties exist:

    pr.SingleControl = false;
                pr.ControlToRender = "ScuManage";
                pr.WrapByScriptTag = false;
    Thanks

    Matt
    Last edited by Daniil; May 18, 2012 at 3:58 PM. Reason: Please use [CODE] tags
  4. #4
    I guess it's an issue with Namespace. I think you actually use the System.Web.Mvc.PartialViewResult class.

    Please try to explicitly set up Namespace:
    Ext.Net.MVC.PartialViewResult pr = new Ext.Net.MVC.PartialViewResult();
  5. #5
    Of course - I should have noticed this! Thanks

Similar Threads

  1. [CLOSED] Migrating to 2: TreePanel loader
    By PhilG in forum 2.x Premium Help
    Replies: 11
    Last Post: May 18, 2012, 3:24 PM
  2. [CLOSED] Migrating a MVC App from v1 to v2
    By RCN in forum 2.x Premium Help
    Replies: 2
    Last Post: Apr 10, 2012, 7:05 PM
  3. [CLOSED] Migrating to Coolite 1.0
    By pattake in forum 1.x Premium Help
    Replies: 4
    Last Post: Mar 31, 2011, 4:11 PM
  4. [CLOSED] Migrating from Coolite to Ext.Net
    By daneel in forum 1.x Premium Help
    Replies: 1
    Last Post: Jan 19, 2011, 11:44 AM
  5. [CLOSED] problem migrating from 06 to 07
    By Lex in forum 1.x Premium Help
    Replies: 2
    Last Post: Mar 05, 2009, 3:57 PM

Tags for this Thread

Posting Permissions