PageTitle turns "Untitled Page" after the callback

  • Thread starter Thread starter Adam The Generic
  • Start date Start date
A

Adam The Generic

Hi All,

I have an ascx control, on the Page_Load method of this control i chage the
Page.Title of the aspx page and some other controls text.
There is no problem with this when first load but whenever my aspx page do a
callback, just the Page.Title turns the "Untitled Page".
this problem occurs just for the Page.Title

Why does this happen?

Thanks.

PS: i use master page for all aspx pages..
 
Hi Mark,

Thanks for your quick reply.
First i mean Ajax..

And my sample logic in the Page_Load is

//***************
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack) {FillThePage();}
}

private void FillThePage()
{
Product =
SetTheObject.GetProduct(Request.QueryString["ProductID"].ToString()); // if
fetches the Product object from the database
this.Page.Title = Product.Name;
lblName.Text = Product.Name;
lblFirm.Text = Product.Firm;
lblDescp.Text =Product.Descp;
}
//*****************

there isn't any problem with label controls, but the Page.Title turns the
"Untitled Page"
 
Hi Mark,

Thanks for your quick reply.
First i mean Ajax..

And my sample logic in the Page_Load is

//***************
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack) {FillThePage();}
}

private void FillThePage()
{
Product =
SetTheObject.GetProduct(Request.QueryString["ProductID"].ToString()); // if
fetches the Product object from the database
this.Page.Title = Product.Name;
lblName.Text = Product.Name;
lblFirm.Text = Product.Firm;
lblDescp.Text =Product.Descp;
}
//*****************

there isn't any problem with label controls, but the Page.Title turns the
"Untitled Page"
 
You are setting the Page.Title in one of the load events with
IsPostback=false only. That is my primary guess here.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
| Think outside the box! |
*************************************************
 
You are setting the Page.Title in one of the load events with
IsPostback=false only. That is my primary guess here.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
| Think outside the box! |
*************************************************
 
Back
Top