Differences between stylesheettheme and theme

Source: Internet
Author: User

Original article: http://www.cnblogs.com/china-liuyang/articles/1050162.html

Differences between stylesheettheme and theme

First, create a file named text. Skin and write it in it.

Text. Skin
<Asp: textbox runat = "server" width = "80px"/> // set the textbox width to 80px.

<Asp: button runat = "server" width = "60px"/> // set the width of the button to 60px.

Then introduce the appearance file on the hello. ASPX page. We use stylesheettheme to introduce

<% @ Page Language = "C #" autoeventwireup = "true" codefile = "Hello. aspx. cs" inherits = "hello" stylesheettheme = "text. Skin" %>

<! 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> test </title>
</Head>
<Body>
<Form ID = "form1" runat = "server">
<Div>
<Asp: textbox id = "txttest" runat = "server" width = "100px"> </ASP: textbox> <! -- Fix the txttest length to 100px -->
<Asp: textbox id = "txttest1" runat = "server"> </ASP: textbox> <! -- Do not set the length for txttest1 -->
<Asp: button id = "btntest" runat = "server" text = "button"/> <! -- Do not set the length for btntest -->
</ASP: dropdownlist>
</Div>
</Form>
</Body>
</Html>

 

The page effect is as follows: the final width of txttest is 100px; the length of txttest1 is 80px; and the length of btntest is 60px. This indicates that the control is fixed in size on the page, then, use the stylesheettheme attribute to reference the appearance file. it does not change the fixed size of the control.

If the referenced appearance file property is changed to theme, the width of all textbox on the page will be 80 PX; (whether or not there is a fixed size) Similarly, the width of all button controls will be 60 PX;

 

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.