Sep 14, 2012, 9:00 AM
[CLOSED] Send Params to window
Hi,
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:
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 !!
}
</script>
<title></title>
</head>
<body id="Body1" runat="server">
<form id="form1" runat="server">
<div>
<ext:ResourceManager ID="ResourceManager1" runat="server" Namespace="myResource" />
<ext:Button ID="Button1" runat="server" Text="open window">
<Listeners>
<Click Handler="showWindow()" />
</Listeners>
</ext:Button>
<ext:TextArea ID="text" runat="server">
</ext:TextArea>
</div>
</form>
<ext:Window ID="employeeWindow" ClientIDMode="Static" runat="server" Resizable="false"
Icon="ApplicationFormEdit" Width="380" Height="330" Hidden="true" Modal="true"
Constrain="false">
<Loader Mode="Frame" ID="Loader1" runat="server" AutoLoad="true" Url="child.aspx">
<Params>
<ext:Parameter Mode="Value" Name="txtToSend" />
</Params>
</Loader>
</ext:Window>
</body>
</html>
Child parent ( window's page) protected void Page_Load(object sender, EventArgs e)
{
string selectedIds = Request.QueryString["txtToSend"]; // selectedIds is empty !!
}
Last edited by Daniil; Sep 18, 2012 at 12:46 PM.
Reason: [CLOSED]