iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Thank you Hendrik, that fixed the issue.
Best,
Jim
Thanks Hendrick,
But I am setting the child page using javascript. But that does not cause the child page to go through it's life-cycle EVERY TIME the same child page is re-opened.
On my parent page, I've got this javascript code which sets a querystring parameter based on a selection in a list, then opens the dialog:
<script language="javascript" type="text/javascript"> function WebButton1_OnClientClick(controlId, parameter) { var WebButton1 = ISGetObject(controlId); var WebDialogBox1 = ISGetObject("WebDialogBox1"); // ToDo - Grab the value of a selected item in a listbox // until then, just hardcode var myIDValue = 1; WebDialogBox1.ContentURL = "Enums_Edit.aspx?myValue=" + myIDValue; WebDialogBox1.ShowDialog(); return true; }
You can see how I'm calling a child page, and supplying it a querystring parameter.
Here's the whole code for the child page:The .aspx page, just a button and a label inside an Update panel:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Enums_Edit.aspx.cs" Inherits="MasterController2012.Utilities.Enums_Edit" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <div> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" /> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> </ContentTemplate> </asp:UpdatePanel> </div> </form> </body> </html>
And the .cs: (set the label to some devault value in Page_Load, and when the user clicks the button, update the label to show the time on the server)
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace MasterController2012.Utilities { public partial class Enums_Edit : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { Label1.Text = "set in page_Load"; } } protected void Button1_Click(object sender, EventArgs e) { Label1.Text = System.DateTime.Now.ToLongTimeString(); } } }
At this point, I'm not using the querysting parameter, so forget about that.
The point is, when the child page loads, it sets the label text to "set in page_Load". If you click the button, the server's time get put into the label.
This works great the FIRST TIME the child page is loaded.
But, close the dialog, then open it again. The page_Load does not fire - the child page will show the time that was in the label, when the dialog was closed. We just re-opened the dialog, I want the label to show 'set in page_Load' every time the dialog is re-opened.
Re-opening the same child page does not cause the page to go through it's lifecycle.
I'm sure that you can see where I'm going with this example - The user will select an item from a list of items that is displayed on the parent page. Then, they pop-up a dialog box which will allow them to edit the item. But to do this, the child page has to go through it's lifecycle every time the page (dialog box) is opened. This is necessary so that I can load the child page with the default values for the selected list item each time the dialog is opened.
Thanks,
Looking forward to your solution,Jim
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname