View Full Version : [CLOSED] Send Params to window

Sep 14, 2012, 9:00 AM

I want to open a window and send parameters to it.
The code that I use works with Ext.net 1.3, but when I tried to switch to version 2, I can't receive the parameter.
Please find below my code:

Parent page:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Parent.aspx.cs" Inherits="MyProject.WindowGridPanel.Parent" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<script language="javascript" type="text/javascript">
function showWindow() {
var win = myResource.employeeWindow;
win.loader.params.txtToSend = myResource.text.getValue();
alert(win.loader.params.txtToSend); // I get the text with the right value!!
win.show(); // The window opens !!

<body id="Body1" runat="server">
<form id="form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" Namespace="myResource" />

<ext:Button ID="Button1" runat="server" Text="open window">
<Click Handler="showWindow()" />
<ext:TextArea ID="text" runat="server">
<ext:Window ID="employeeWindow" ClientIDMode="Static" runat="server" Resizable="false"
Icon="ApplicationFormEdit" Width="380" Height="330" Hidden="true" Modal="true"
<Loader Mode="Frame" ID="Loader1" runat="server" AutoLoad="true" Url="child.aspx">
<ext:Parameter Mode="Value" Name="txtToSend" />


Child parent ( window's page)

protected void Page_Load(object sender, EventArgs e)
string selectedIds = Request.QueryString["txtToSend"]; // selectedIds is empty !!

Sep 14, 2012, 12:07 PM

A load request with empty parameter is already made before Window showing.

So, when you call the show method, no request occurs.

I would suggest you to:

1. Set

for the Loader.

2. Change your function to:

function showWindow() {
var win = myResource.employeeWindow;

params: {
txtToSend : "hello!"

If you need the Window to be reloaded on each showing you can configure the Loader in a respective way setting its TriggerEvent and ReloadOnEvent properties.