External window - problem with the event

  1. #1

    External window - problem with the event



    Hi,

    I have a little problem:

    I had created an external windows to call to an asp page with the next code:

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ManageReservation.aspx.cs" Inherits="Reservations.ManageReservation" EnableEventValidation="false" %>
    
    
    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
    <%@ Import Namespace="Coolite.Utilities" %>
    
    
    <html>
    <head id="Head1" runat="server">
        <title></title>
        <!-- Styles-->
     </head>
    <body>
        <form id="formReservation" runat="server">
            <ext:ScriptManager ID="ScriptManager1" runat="server" StateProvider="None" Theme="Slate" />
            <!-- Stores-->
            
            <!-- Content --> 
            <ext:ViewPort ID="ViewPort1" runat="server" >
            <Body >
                <ext:BorderLayout ID="BorderLayout1" runat="server"  >
                    <North MarginsSummary="5 5 5 5" Collapsible="false" CollapseMode="Default" />
                    <Center MarginsSummary="0 5 0 5" AutoHide="true">
                        <ext:Panel ID="PaneGeneral"  runat="server" Frame="true"  AutoScroll="true">
                            <Body>
                                <!-- other controls -->
                            </Body>
                        </ext:Panel>
                    </Center>
                </ext:BorderLayout>
            </Body>
            </ext:ViewPort>
            <!-- external window -->
              <ext:Window ID="windowExtSearchCustomers" runat="server" 
                Title="<%$ Resources: windowExtSearchCustomers %>" 
                Icon="UserMagnify" Resizable="false"  />
    
    
        </form>
    </body>
    </html>
    (code page)

    protected void Page_Load(object sender, EventArgs e)
            {
                if (!IsPostBack)
                {
                    this.LoadWindowExtSearchCustomers();
                }
            }
    
    
    
            private void LoadWindowExtSearchCustomers()
            {
                this.windowExtSearchCustomers.Width = Unit.Pixel(800);
                this.windowExtSearchCustomers.Height = Unit.Pixel(300);
                this.windowExtSearchCustomers.Modal = false;
                this.windowExtSearchCustomers.Collapsible = true;
                this.windowExtSearchCustomers.Maximizable = true;
                this.windowExtSearchCustomers.AutoLoad.Url = "../Customers/ExtSearchCustomers.aspx/";
                this.windowExtSearchCustomers.AutoLoad.Mode = LoadMode.IFrame;
                this.windowExtSearchCustomers.ShowOnLoad = false;
            }

    To call the next asp.page:

    <html>
    <head runat="server">
        <title></title>
        <!-- Styles-->    
    </head>
    <body>
        <form id="formSearchClients" runat="server">
            <ext:ScriptManager ID="ScriptManagerSearchCustomers" runat="server" StateProvider="None" Theme="Slate" />
            <!-- Stores-->
            <!-- Content --> 
            <ext:ViewPort ID="ViewPortSearchCustomers" runat="server" Width ="800"  >
            <Body >
                <ext:BorderLayout ID="BorderLayout" runat="server"  >
                    <North MarginsSummary="5 5 5 5" Collapsible="false" CollapseMode="Default">
                        <ext:Panel ID="PaneSearchCustomers"  runat="server" Frame="true"  AutoScroll="true" AutoHeight="true" >
                           <Body>
                               <table>
                                  <tr>
                                    <td >
                                        <!-- others control -->
                                    </td>
                                    <td>
                                        <ext:Button ID="btnSearch" Text="<%$ Resources: btnSearch %>" Icon="Magnifier" runat="server" >
                                            <AjaxEvents>
                                                <Click OnEvent="OnBtnSearchClick" >
                                                    <EventMask ShowMask="true" Msg="" />
                                                </Click>
                                            </AjaxEvents>
                                        </ext:Button>
                                    </td>
                                  </tr>
                               </table>
                           </Body>
                        </ext:Panel>
                    </North>
                    <Center MarginsSummary="0 5 0 5" AutoHide="true">
                        <ext:Panel ID="PanelCustomersResults"  runat="server" Frame="true"  AutoScroll="true">
                           <Body>
                                <!-- others controls -->
                           </Body>
                        </ext:Panel>
                    </Center>
                </ext:BorderLayout>
            </Body>
            </ext:ViewPort>
        </form>
    </body>
    </html>
    (code page)
     
         protected void OnBtnSearchClick(object sender, AjaxEventArgs e)
            { 
                //Empty
            }
    When I click in "btnSearch" the aplication gives me an error. Error consist of that the aplication tries to redirect to the url: /Web/Customers/ExtSearchCustomers.aspx/ExtSearchCustomers.aspx and it doesn't exist.

    I don't know where it gets this url because the real url is /Web/Customers/ExtSearchCustomers.aspx. What can be the problem?


    Thank you.
  2. #2

    RE: External window - problem with the event

    Hi,

    Remove last slash in AutoLoad url. Need
    this.windowExtSearchCustomers.AutoLoad.Url = "../Customers/ExtSearchCustomers.aspx";



    With slash at the end the server try to open folder with that name


  3. #3

    RE: External window - problem with the event

    Perfect! Thank you, vladimir, for the solution.

    Best wishes.

Similar Threads

  1. [CLOSED] Standard Form Window Instead of Event Edit Window
    By ppqrnd in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Dec 07, 2011, 1:20 AM
  2. Replies: 3
    Last Post: Jun 10, 2011, 1:17 PM
  3. [CLOSED] Button event is not firing in parent window from popup window
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 14, 2011, 7:35 PM
  4. Add a tab to tabpanel from external page
    By marcozzz in forum 1.x Help
    Replies: 0
    Last Post: Feb 16, 2010, 8:48 AM
  5. Load External Website into an
    By Kamal in forum 1.x Help
    Replies: 3
    Last Post: Jul 25, 2009, 6:16 AM

Posting Permissions