PDA

View Full Version : [CLOSED] load page with querystring in a extnet window



onsite
Aug 24, 2013, 4:53 AM
hi.

i have 2 stand alone pages that contains a ext.net window object and try to load on it a 2nd page that receive as parameter in the query string a value, lets say

one.aspx
---------------------


<body>
<form>

<ext:FormPanel>
<Items>

<ext:TextField ID="contactid" runat="server" />
<ext:Button ID="xx" runat="server" Text="Contacts">
<DirectEvents>
<Click OnEvent="ShowContacts" />
</DirectEvents>
</ext:Button>
</Items>
</ext:FormPanel>
<ext:window id="windowCn" runat="server" Hidden="true" X="300" Y="300" Width="300" Height="300" AutoRender="false" />
</form>
</body>



one.aspx.cs
-------------------------


protected void ShowContacts( object sender, EventArgs e)
{
WindowCn.Loader = new ComponentLoader{
Url=string.Format("http://localhost/frm/frmContacts.aspx?cn={0}",contactid.Text),
Mode=LoadMode.Frame
};
WindowCn.Show();
}


if i load the page http://localhost/frm/frmContacts.aspx?cn=1 right into the browser it shows data, but when i run the one.aspx page and click the button, the window is shown but no content is shown ( the contactid textbox = 1 )

any clue?

Daniil
Aug 26, 2013, 6:56 AM
Hi @onsite,

Please predefine a Loader:

<ext:Window ID="windowCn">
<Loader runat="server" AutoLoad="false" />
</ext:Window>

and use

protected void ShowContacts(object sender, EventArgs e)
{
windowCn.Show();
windowCn.LoadContent(new ComponentLoader
{
Url = string.Format("http://localhost/frm/frmContacts.aspx?cn={0}", contactid.Text),
Mode = LoadMode.Frame
});
}