Document title

  • Thread starter Thread starter Tumurbaatar S.
  • Start date Start date
T

Tumurbaatar S.

How to change a document's title programmatically, from the Page_Load() for
example?
 
you can either create a literal and set its text to:
<Title>Some TITLE</title>

Or, you can declare a public variable in your code like follows
public string PageTitle;

then in your Title tag do this:
<TITLE><%=PageTitle%></TITLE>
 
Sounds fine to me, never tested i though.

if you change the # to and =, you wouldn't have to use the Page.DataBind()
method.
But it should work fine
 
Hi,

Declare it as HtmlGenericControl.


i was also thinking that.

But how do you declare the title in your code behind?
Vis studio doesn't add it automatically
 
Back
Top