Jan 15, 2014, 1:42 PM
[CLOSED] QueryString Dropped between files using frame loader
I have a main file(file1.aspx) that contains 2 windows with loaders to separate files(file2.aspx and file3.aspx). Based on a method in file2.aspx, a directMethod is called on file1.aspx, passing to it a JSON string. In that file, the same JSON string is passed to file3.aspx as a querystring. The first time that file 3 is accessed, the querystring only contains "[{" , and nothing else. On subsequent loads it works as expected. Please see example code below.
File1.aspx
Thanks in advance for your help.
File1.aspx
<ext:Window runat="server"
ID="File2Window"
Title="File2"
Hidden="true"
Width="650">
<Loader runat="server"
ID="File2WindowLoader"
Mode="Frame"
AutoLoad="false" />
</Window>
<ext:Window runat="server"
ID="File3Window"
Title="File3"
Hidden="true"
Width="650">
<Loader runat="server"
ID="File3WindowLoader"
Mode="Frame"
AutoLoad="false" />
</Window>
File1.aspx.cs[DirectMethod]public void LoadFile3(string JsonString)
{
File3Window.Loader.Url = string.Format("file3.aspx?JsonString={0}", JsonString);
File3Window.LoadContent();
File3Window.Show();
}
File2.aspx.cs(HeaderList is a List<T>)
X.Js.Call("parent.App.direct.dmLoadFile3(" + Ext.Net.JSON.Serialize(HeaderList) + ")");
File3.aspx.csprotected void Page_Load(object sender, EventArgs e)
{
FillComboBox(Request.QueryString["JsonString"]);
}
protected void FillComboBox(string JsonString)
{
Dictionary<string, string>[] Headers = JSON.Deserialize<Dictionary<string, string>[]>(JsonString);
...do other stuff
}
The value is passed from File2 to File1 properly every time, and when debugging, the File3Window.Loader.Url appears correct, but on the first load of File3, the JsonString is "[{". Thanks in advance for your help.
Last edited by Daniil; Jan 24, 2014 at 3:43 AM.
Reason: [CLOSED]