﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - WebDesktop - WebDialog, IFrame and Page_Load issue</title><link>http://www.intersoftsolutions.com/Community/WebDesktop/WebDialog-IFrame-and-PageLoad-issue/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>WebDialog, IFrame and Page_Load issue</title><link>http://www.intersoftsolutions.com/Community/WebDesktop/WebDialog-IFrame-and-PageLoad-issue/</link><pubDate>Fri, 04 Nov 2011 16:14:25 GMT</pubDate><dc:creator>jdresser@idexcorp.com</dc:creator><description>&lt;p&gt;Thank you Hendrik, that fixed the issue.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Best,&lt;/p&gt;
&lt;p&gt;Jim&lt;/p&gt;</description></item><item><title>WebDialog, IFrame and Page_Load issue</title><link>http://www.intersoftsolutions.com/Community/WebDesktop/WebDialog-IFrame-and-PageLoad-issue/</link><pubDate>Thu, 03 Nov 2011 23:01:27 GMT</pubDate><dc:creator>hendrik</dc:creator><description>Hi Jim,&lt;br /&gt;&lt;br /&gt;I think i know why the Page_Load of your child page does not fire every time when the dialog box re-opened. It's because you use ContentURL property to set the URL of your dialog box. This same as you set ContentURL from property window of dialog box even if you set it in client using javascript. You should be use SetContentURL method in client side as i mean before. &lt;br /&gt;&lt;br /&gt;So, simply change your code like below.&lt;br /&gt;&lt;blockquote style="padding-left: 10px; margin: 0px 0px 0px 5px; border-left: 1px solid rgb(204, 204, 204);"&gt;&lt;em&gt;&lt;pre&gt;&lt;strong&gt;//before&lt;/strong&gt;&lt;br /&gt; WebDialogBox1.ContentURL = "Enums_Edit.aspx?myValue=" &amp;#43; myIDValue;&lt;br /&gt;&lt;br /&gt;//after&lt;br /&gt; WebDialogBox1.SetContentURL("Enums_Edit.aspx?myValue=" &amp;#43; myIDValue);&lt;/pre&gt;&lt;/em&gt;&lt;/blockquote&gt;Please let me know if i said is not as you mean. Thanks&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Hendrik&lt;br /&gt;&lt;em&gt;&lt;br /&gt;&lt;br /&gt;&lt;/em&gt;</description></item><item><title>WebDialog, IFrame and Page_Load issue</title><link>http://www.intersoftsolutions.com/Community/WebDesktop/WebDialog-IFrame-and-PageLoad-issue/</link><pubDate>Thu, 03 Nov 2011 07:53:06 GMT</pubDate><dc:creator>jdresser@idexcorp.com</dc:creator><description>&lt;p&gt;Thanks Hendrick,&lt;/p&gt;
&lt;p&gt; But I am setting the child page using javascript.  But that does not cause the child page to go through it's life-cycle &lt;strong&gt;EVERY TIME&lt;/strong&gt; the same child page is re-opened.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;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:&lt;/p&gt;&lt;pre&gt;  &amp;lt;script language="javascript" type="text/javascript"&amp;gt;
    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=" &amp;#43; myIDValue;
      WebDialogBox1.ShowDialog();
      return true;
    }&lt;/pre&gt;
&lt;p&gt;You can see how I'm calling a child page, and supplying it a querystring parameter.&lt;/p&gt;
&lt;p&gt;Here's the whole code for the &lt;strong&gt;child&lt;/strong&gt; page:&lt;br /&gt;The .aspx page, just a button and a label inside an Update panel:&lt;/p&gt;&lt;pre&gt;&amp;lt;%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Enums_Edit.aspx.cs" Inherits="MasterController2012.Utilities.Enums_Edit" %&amp;gt;

&amp;lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&amp;gt;


&amp;lt;html xmlns="http://www.w3.org/1999/xhtml"&amp;gt;
&amp;lt;head runat="server"&amp;gt;
  &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
  &amp;lt;form id="form1" runat="server"&amp;gt;
  &amp;lt;asp:ScriptManager ID="ScriptManager1" runat="server"&amp;gt;
  &amp;lt;/asp:ScriptManager&amp;gt;
  &amp;lt;div&amp;gt;
    &amp;lt;asp:UpdatePanel ID="UpdatePanel1" runat="server"&amp;gt;
      &amp;lt;ContentTemplate&amp;gt;
        &amp;lt;asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" /&amp;gt;
        &amp;lt;asp:Label ID="Label1" runat="server" Text="Label"&amp;gt;&amp;lt;/asp:Label&amp;gt;
      &amp;lt;/ContentTemplate&amp;gt;
    &amp;lt;/asp:UpdatePanel&amp;gt;
  &amp;lt;/div&amp;gt;
  &amp;lt;/form&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;

&lt;p&gt;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)&lt;br /&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;pre&gt;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();
    }
  }
}&lt;/pre&gt;

&lt;p&gt;At this point, I'm not using the querysting parameter, so forget about that.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;This works great the FIRST TIME the child page is loaded.  &lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Re-opening the&amp;nbsp;same child page&amp;nbsp;does not cause the page to go through it's lifecycle.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Looking forward to your solution,&lt;br /&gt;Jim&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item><item><title>WebDialog, IFrame and Page_Load issue</title><link>http://www.intersoftsolutions.com/Community/WebDesktop/WebDialog-IFrame-and-PageLoad-issue/</link><pubDate>Thu, 03 Nov 2011 06:02:12 GMT</pubDate><dc:creator>hendrik</dc:creator><description>Hi Jim,&lt;br /&gt;&lt;br /&gt;You can try to set the content URL of dialog box from client side. By this way, you can to go through the entire page life cycle EVERY TIME when you show the dialog. &lt;br /&gt;&lt;br /&gt;You can view a sample to set content URL from client side in our WebDesktop samples in WebDialogBox folder with name ClientSideApi.aspx. Don't forget to leave blank the ContentURL property of dialog box. Hope this helps.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Hendrik</description></item><item><title>WebDialog, IFrame and Page_Load issue</title><link>http://www.intersoftsolutions.com/Community/WebDesktop/WebDialog-IFrame-and-PageLoad-issue/</link><pubDate>Wed, 02 Nov 2011 09:26:15 GMT</pubDate><dc:creator>jdresser@idexcorp.com</dc:creator><description>&lt;p&gt;I'm using your WebDialog to load a .aspx page (using the IFrame method).  It works great.  On the parent page, clicking a WebButton calls some javascript code, that opens the dialog.  (code came from one of your samples).  The Dialog opens, and loads the child .aspx page. &lt;/p&gt;
&lt;p&gt;This child .aspx page goes through the .NET page life cycle (Page_Load....).   So far, everything is great.&lt;/p&gt;
&lt;p&gt;Then, close the dialog.&lt;/p&gt;
&lt;p&gt;Finally, if I click the button to open the dialog again, the IFrame page (the clild page) DOES NOT go through the page life cycle again.  The child page is just opened again, with the state that it was in when it was closed.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;How wo I get the child page (an IFrame page inside your dialog box), to go through the entire page lifecycle EVERY TIME the dialog is opened?   &lt;/p&gt;
&lt;p&gt;Let me know if you need a sample project.&lt;/p&gt;
&lt;p&gt;Thanks - Jim&lt;/p&gt;</description></item></channel></rss>