Asp.net| News | page
asp.net1.1 because there is no masterpage feature, it is difficult to dynamically change page headers. Find a simple way to share with you online today.
Typically, the title of the page should be this: <title>page title</title>
Let's make some changes: <title runat= "Server" id= "PageTitle" ></title>, which turns title into a server control.
Next, we add the control declaration to the CS of the page:
protected System.Web.UI.HtmlControls.HtmlGenericControl pagetitle;
Finally, we can add code to change the title of a page in any trigger event, such as adding a button click event
This. pagetitle.innertext= "Title change succeed!";
PS: How do I submit when always prompt "This name has been registered users, please use a different name"?
@ "How do I submit when I always prompt" this name has been used by registered users, please use a different name "? “
This is because there is a variable named PageTitle in your CS page that you can delete to add
In fact, this name does not matter, you can change to other names, such as title, of course, and other control names conflict can be.
Your first question I think should be OK, you can try, because in this case it is as a server control exists, try to remember to tell me the result: Good luck!