473,385 Members | 1,353 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Problem by postback

Hello,

In my ASP.Net project, after posback , the title of page is gone. In Page_Load I have used of
Page.Header.Controls.Add(new LiteralControl(@"<title>Select document</title>"));

But it get the title only for first time and after posback there is no title.
Please tell me what I have to do.

Zohreh
Apr 24 '08 #1
5 1094
Stang02GT
1,208 Expert 1GB
Unfortunatly this is not the right thread for ASP.NET questions. Please PM a site moderator and ask them to move your post to the correct forum.

Please look around before posting to make sure that you post in the right forum. Saves the MODS time/pain of moving your thread and it will help you get a better answer.


Please Read posting guidelines as well.
Apr 24 '08 #2
Hello,

In my ASP.Net project, I have used of Modal dialog page. Everything is ok but after posback , the title of page is gone.
In Page_Load I have used of :
Expand|Select|Wrap|Line Numbers
  1. Page.Header.Controls.Add(new LiteralControl(@"<title>Select </title>"));
The first time is good en then there is no title.
Please tell me what I have to do.

Regards
Zohreh
Apr 25 '08 #3
Frinavale
9,735 Expert Mod 8TB
Hello,

In my ASP.Net project, I have used of Modal dialog page. Everything is ok but after posback , the title of page is gone.
In Page_Load I have used of :
Expand|Select|Wrap|Line Numbers
  1. Page.Header.Controls.Add(new LiteralControl(@"<title>Select </title>"));
The first time is good en then there is no title.
Please tell me what I have to do.

Regards
Zohreh
Please post your Page_Load code.
I have a feeling that you are adding the header to the hpage if it's the first time posting back only....


Why don't you just add the title directly to your HTML instead of doing it dynamically?

-Frinny
Apr 25 '08 #4
Please post your Page_Load code.
I have a feeling that you are adding the header to the hpage if it's the first time posting back only....


Why don't you just add the title directly to your HTML instead of doing it dynamically?

-Frinny
[quote=zohrehf]Hello,I explain from beginning:
I am using modal dialog box page Select.aspx(Page title is Start case ) in my asp.net project. In that dialog box page, I have a grid view control with enabled paging.

When the Modaldialogbox page is loaded it showing the Title as "Start case --WebDialog Box". It is fine. But

When ever i go to next page by clicking gridview paging, The title is disappearing but showing only "webDialogBox".

I want persistant title same as "Start case WebDialog Box" when ever i go to next page in the gridview.

I added the title directly to the HTML , but i am facing the same problem.

The code of Page_Load is:


Expand|Select|Wrap|Line Numbers
  1. protected void Page_Load(object sender, EventArgs e)
  2. {
  3. Page.Header.Controls.Add(new LiteralControl(@"<base target=""_self"" />")); 
  4. Page.Header.Controls.Add(new LiteralControl(@"<title>Start case  </title>")); 
  5. if (!IsPostBack) 
  6. {}
  7. }
  8.  
Thank you
Zohreh
Apr 28 '08 #5
Frinavale
9,735 Expert Mod 8TB
...


Expand|Select|Wrap|Line Numbers
  1. protected void Page_Load(object sender, EventArgs e)
  2. {
  3. Page.Header.Controls.Add(new LiteralControl(@"<base target=""_self"" />")); 
  4. Page.Header.Controls.Add(new LiteralControl(@"<title>Start case  </title>")); 
  5. if (!IsPostBack) 
  6. {}
  7. }
  8.  
Thank you
Zohreh
Maybe more than one title tag is being rendered in the browser and it is unable to display it properly?

View the code once the page has been rendered and check for more than one <title> tag (right click on the page and select View Source).

I still don't know why you don't just physically add the title to the page...

EG: in your ASP page Source View...
Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" >
  3. <head Id="Head1" runat="server">
  4.     <title>Put your title here????</title>  
  5.     <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
  6.      <link rel="icon" href="myIcon.ico" type="image/x-icon" />  
  7. </head>
  8. <body>
  9. <!-- .............-->
  10.  
-Frinny
Apr 28 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: MrMike | last post by:
I have a datagrid containing a drop-down-list. The datagrid contains Edit,Update,Cancel buttons and respective events. Whenever I make a change to one particular field (a drop-down-list in...
5
by: fripper | last post by:
I posted this problem a couple of days ago but felt I might have better luck re-stating the problem. Apparently I messed up IIS (v. 5) somehow because I am suddenly unable to load web forms! A...
0
by: bill yeager | last post by:
I have a simple button and textbox on a webform with a RequiredFieldValidator tied to the textbox control. The problem is that a postback never occurs on the webform by clicking the button even...
9
by: Anders K. Jacobsen [DK] | last post by:
Hi I have this that adds some usercontrol (UCTodays.ascx) to a placeholder foreach(A a in B){ UCTodays ucline = (UCTodays )LoadControl("UCTodays.ascx");...
3
by: Tim::.. | last post by:
Can someone please tell my why I get the following problem when I type the following piece of code! How do I get around this??? The idea is that when a user clicks a button on a form it causes...
6
by: | last post by:
Hi all, I have a bunch of dropdownlists that are populated in client-side javascript. When i do a postback I get the following error:- Invalid postback or callback argument. Event...
6
by: hlubocky | last post by:
I thought I had a good grasp of the problem related to dynamically creating controls, but it appears that as my application grew in complexity, the problem has resurfaced. As I understand it, in...
4
by: Harry | last post by:
Hi, This aspx page (let's call it thispage.aspx) fetches data from a sqldatasource, then performs several things (in code-behind) and, to simplify, passes data from code-behind via a hiddenfield...
2
by: Simit Kulkarni | last post by:
Hi All, I am stucked with a problem , regarding Repeater Controls Header Template. I want to show a Image Button in the Header Template of a Repeater Control and on the Click of...
2
by: NannMaw | last post by:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Server Error in '/WebSite1' Application. -------------------------------------------------------------------------------- Invalid postback or callback argument. ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.