If you want to make the Asp.net Application Program You can use the following methods to specify a custom style table or title for a page:
First, modify the title and style sheet of the The Code :
<Title> webform1 </title>
<Link ref = "stylesheet" type = "text/CSS" href = "control.css">
Modified code:
<Title runat = "server" id = "title1"> webform1 </title>
<Link id = "link1" runat = "server" type = text/CSS "ref =" stylesheet "> </link>
We add runat = server to both HTML elements and mark them as server-side controls so that we can access them in the server code.
In the webform1.aspx. CS file, we can use the C # code to control the row.
Private void button#click (Object sender, system. eventargs E)
{
Control CTRL = page. findcontrol ("title1"); // search for the title we modified to runat = server.
(Htmlgenericcontrol) CTRL). innertext = "hello ";
CTRL = page. findcontrol ("link1 ");
(Htmlgenericcontrol) CTRL). Attributes. Add ("href", "control.css ");
}
The above steps can be used to dynamically change the title of the Asp.net page and dynamically specify the page style table.