|
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Drawing;
public partial class ParentForm : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
//Set default values to the control on PageLoad for first time.
lblChildWinValue.Text = "ChildWin Value: " + "NONE";
lblCurrTime.Text = "CurrTime: " + DateTime.Now.ToString();
lblPageLoadTime.Text = "PageLoadTime: " + DateTime.Now.ToString();
}
}
protected void btnHiddenForUpdate_ServerClick(object sender, EventArgs e)
{
//Update Panels update - repopulate the controls the way needed.
lblChildWinValue.Text = "ChildWin Value: " + "SOME VALUE";
lblCurrTime.Text = "CurrTime: " + DateTime.Now.ToString();
lblChildWinValue.BackColor = Color.Yellow;
lblCurrTime.BackColor = Color.Yellow;
//Just to show that this label wont update as outside the update panel
lblPageLoadTime.Text = "PageLoadTime: " + DateTime.Now.ToString();
lblPageLoadTime.BackColor = Color.Yellow;
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.