[CLOSED] Partial View not Rendering

  1. #1

    [CLOSED] Partial View not Rendering

    Hi,

    I am trying to render a partial view similar to the MVC sample on the site(Dynamic Partial Rendering -> ASPX Engine) but the view is not rendering.
    The sample on the site does not work either.


    MAIN PAGE

    <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title></title>
    </head>
    <body>
        <ext:ResourceManager runat="server" />
        
        <ext:Viewport runat="server" Layout="fit">
            <Items>
                <ext:TabPanel runat="server">
                    <Items>
                        
                        <ext:Panel runat="server" Title="Load View With Layout" Layout="Border">
                            <Items>
                                <ext:Panel ID="Tab2_West" runat="server" Title="West" Width="250" Layout="Fit" Region="West" />
                                <ext:Panel runat="server" Title="Center" Margins="0 0 0 5" Region="Center">
                                    <Items>
                                        <ext:Button runat="server" Text="Click to load west region">
                                            <DirectEvents>
                                                <Click Url="/Dynamic_Partial_Rendering/ASPX_Engine/View2">
                                                    <ExtraParams>
                                                        <ext:Parameter Name="containerId" Value="#{Tab2_West}" Mode="Value" />
                                                    </ExtraParams>
                                                </Click>
                                            </DirectEvents>
                                        </ext:Button>
                                    </Items>
                                </ext:Panel>
                            </Items>
                        </ext:Panel>
                        
                    </Items>
                </ext:TabPanel>
            </Items>
        </ext:Viewport>
    </body>
    </html>

    CONTROLLER

    public class ASPX_EngineController : Controller
        {
           
            public ActionResult View2(string containerId)
            {
                PartialViewResult pr = new PartialViewResult(containerId);
                pr.RenderMode = RenderMode.AddTo;
                pr.Items = true;
                return pr;
            }
    
        }


    VIEW2

    <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
        <ext:Viewport ID="viewportResultView" runat="server" Layout="border" IDMode="Static">
            <Items>
                <ext:Panel ID="Panel2" runat="server" Title="Sample" Height="100" Region="Center">
                    <Items>
                        <ext:GridPanel IDMode="Static" ID="gridPanelCompanyInformation" runat="server" Region="North"
                            Title="Array Grid" Width="600" Height="350">
                            <Store>
                                <ext:Store ID="Store1" runat="server" AutoLoad ="false" Buffered="true" PageSize = "100" >
                                    <Model>
                                        <ext:Model ID="Model1" runat="server" >
                                            <Fields>
                                                <ext:ModelField Name="Firstname" />
                                                <ext:ModelField Name="Lastname" />
                                                <ext:ModelField Name="Age" Type="Int" />
                                            </Fields>
                                        </ext:Model>
                                    </Model>
                                </ext:Store>
                            </Store>
                            <ColumnModel>
                                <Columns>
                                        <ext:Column ID="Column1"  runat="server" Text="Firstname" DataIndex="Firstname"  />
                                        <ext:Column ID="Column2"  runat="server" Text="Lastname" DataIndex="Lastname"  />
                                       <ext:Column ID="Column3"  runat="server" Text="Age" DataIndex="Age"  />
                                </Columns>
                            </ColumnModel>
                            <SelectionModel>
                                <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" />
                            </SelectionModel>
                        </ext:GridPanel>
                    </Items>
                </ext:Panel>
                </Items>
            <Listeners>
            </Listeners>
        </ext:Viewport>
    Last edited by Daniil; Apr 01, 2013 at 7:09 AM. Reason: [CLOSED]
  2. #2
    Hi,

    Please ignore I realized the problem was with the viewport.

Similar Threads

  1. [CLOSED] [2.1] MVC Partial View
    By softmachine2011 in forum 2.x Premium Help
    Replies: 4
    Last Post: Aug 23, 2012, 1:04 PM
  2. ASP.NET MVC partial rendering
    By wdk in forum 1.x Help
    Replies: 16
    Last Post: Jul 20, 2012, 1:01 PM
  3. [CLOSED] Problem rendering partial view
    By T3rryChan in forum 2.x Premium Help
    Replies: 4
    Last Post: Jul 03, 2012, 10:22 PM
  4. [CLOSED] rendering desktop windows using partial view
    By SymSure in forum 1.x Premium Help
    Replies: 7
    Last Post: Jan 11, 2012, 7:42 PM
  5. [CLOSED] Dynamically Added Tab not rendering partial view
    By SymSure in forum 1.x Premium Help
    Replies: 13
    Last Post: Apr 26, 2011, 10:10 PM

Posting Permissions