Masterpage and theme.

Source: Internet
Author: User
1. It seems that it is not convenient to modify the site-level theme, and the program in Web. config is not easy to modify.
Page. Theme attributes, which must be written for each page.
Is there a better way to set site-level themes?
It is difficult to inherit pages. You can override the page_preinit method of pages, but the default method is the inherited system. Web. Page class.

2. Set a masterpage template page with the contentplaceholder1 control in addition to some frameworks and navigation.
The Code is as follows: <% @ master language = "C #" autoeventwireup = "true" codefile = "masterpage. master. cs" inherits = "masterpage" %>

<! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<HTML xmlns = "http://www.w3.org/1999/xhtml">
<Head runat = "server">
<Title> untitled page </title>
</Head>
<Body>
<Form ID = "form1" runat = "server">
<Div>
& Nbsp; <Table width = "777" class = "maintable">
<Tr>
<TD colspan = "3" align = "center">
This is the navigation </TD>
</Tr>
<Tr>
<TD style = "width: 166px">
</TD>
<TD style = "width: 418px">
<Asp: contentplaceholder id = "contentplaceholder1" runat = "server">
</ASP: contentplaceholder>
</TD>
<TD style = "width: 182px">
</TD>
</Tr>
<Tr>
<TD colspan = "3" style = "height: 21px" align = "center">
This is the bottom </TD>
</Tr>
</Table>
</Div>
</Form>
</Body>
</Html>

Now there is a form server control, And I will add another default. aspx. When this template is applied, there are some textbox and button controls in default. aspx.
How can I use the form. defaultbutton and form. defaultfocus attributes added in Asp.net 2.0? I cannot add a form, and the form1 in the original masterpage. Master cannot be used. Because I may have other pages to use this template, I think this should be set in default. aspx, but I don't know how to set it.

Have you ever thought about this?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.