[CLOSED] [Razor] Setup Auto load panel in razor

  1. #1

    [CLOSED] [Razor] Setup Auto load panel in razor

    Hi dev team,
    I try to create Panel with autoload( Loader in version 2.0) and this is my code:
    Html.X().Panel()
                           .Region(Region.Center)
                           .ID("centerPanel")
                           .Height(600)
                           .Title("Home")
                           .AutoDoLayout(true)
                           .Loader(new ComponentLoader {
                               AutoLoad = true,
                               DisableCaching = true,
                               Url = "http://google.com",
                               ReloadOnEvent = true
                           })
    Nothing happened, when I open Google Chrome Debug Console, it show an error:

    7Refused to display document because display forbidden by X-Frame-Options.

    Please check this for me. And how to reload panel with new url? My javascript function:

    function loadContent(title, url) {
    
                App.centerPanel.load({
                        url: url,
    
    
                        disableCaching: true,
                        text: "Loading...",
    
                        timeout: 30,
    
    
                        scripts: true,
                        mode: 'iframe'
    
    
    
                    });
                    App.centerPanel.setTitle(title);
    
    
            }
    Same error display in Chrome debug console:

    Refused to display document because display forbidden by X-Frame-Options.

    Thanks and best regards,
    Last edited by Daniil; May 02, 2012 at 9:43 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Just Google prevents its site to be loaded into iframe.

    Here is the example with Ext.NET and Ext.NET forums site which are allowed to be loaded into iframe.

    Example
    <%@ Page Language="C#" %>
    
    <%@ 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>Ext.NET v2 Example</title>
    </head>
    <body>
        <ext:ResourceManager runat="server" />
    
        <ext:Panel ID="Panel1" runat="server" Width="400" Height="400">
            <Loader runat="server" Url="http://ext.net" />
        </ext:Panel>
    
        <ext:Button runat="server" Text="Load Ext.NET forums">
            <Listeners>
                <Click Handler="App.Panel1.load({
                                    url : 'http://forums.ext.net'
                                });" />
            </Listeners>
        </ext:Button>
    </body>
    </html>

Similar Threads

  1. [CLOSED] [RAZOR] DraggablePanelConfig doesn't have StartDrag in Razor
    By UnifyEducation in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 28, 2012, 2:37 PM
  2. [MVC + Razor] How to load data on the form?
    By Natalie in forum 2.x Help
    Replies: 4
    Last Post: Sep 18, 2012, 10:24 AM
  3. [CLOSED] [RAZOR] Dynamically load contents into Panel
    By gets_gui in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Jul 04, 2012, 10:45 PM
  4. [CLOSED] [Razor] HyperLink Text in Razor
    By UnifyEducation in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Jun 20, 2012, 12:16 PM
  5. [CLOSED] [Razor] Add GridView to GridPanel in razor
    By boris in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: May 09, 2012, 4:23 PM

Posting Permissions