1. radiobuttonlist common attributes: selecteditem. Text; Selected. text;
2. Common attributes of multiview: activeviewindex;
3. The adratator control mainly writes XML files.
For example:
<? XML version = "1.0" encoding = "UTF-8"?> <Br/> <advertisements xmlns = "http://schemas.microsoft.com/AspNet/AdRotator-Schedule-File"> <br/> <ad> <br/> <imageurl> ~ /Image/11.png</imageurl> <br/> <navigageurl> http://www.baidu.com </navigageurl> <br/> <alternatetext> ad for Baidu </alternatetext> <br/> <impressions> 50 </impressions> <br/> </Ad> <br/> <ad> <br/> <imageurl> ~ /Image/670_s.gif </imageurl> <br/> <navigageurl> http://www.zhangjiajia.com </navigageurl> <br/> <alternatetext> ad for Jiajia </alternatetext> <br/> <impressions> 100 </impressions> <br/> </Ad> <br/> <ad> <br/> <imageurl> ~ /Image/1530.gif</imageurl> <br/> <navigageurl> http://www.1234.com </navigageurl> <br/> <alternatetext> ad for 1234 </alternatetext> <br/> <impressions> 10 </impressions> <br/> </Ad> <br/> </advertisements> <br/>
4. response. Write (server. htmlencode ("<HTML>"); // encode it so that it can be output on the page.
5. Common Properties of the literal control: literalmode
Literal1.text = "this is <B> text </B> inserted dynamically ";
Literal1.mode = literalmode. encode; // encode it so that it can be output on the page
Literal1.mode = literalmode. passthrough; // Let it execute the label Function
6. Add a text box to the panel control dynamically:
Page code:
<Div>
<Asp: Panel id = "Panel1" runat = "server" backcolor = "lightgoldenrodyellow" groupingtext = "panel control"
Height = "50px" width = "300px">
Container used as the dynamically generated text box... </ASP: Panel>
</Div>
Generate textboxes: <asp: dropdownlist id = "dropdownlist1" runat = "server">
<Asp: listitem> 1 </ASP: listitem>
<Asp: listitem> 2 </ASP: listitem>
<Asp: listitem> 3 </ASP: listitem>
</ASP: dropdownlist>
Background code:
Int num = int. parse (dropdownlist1.selecteditem. value );
For (INT I = 0; I <num; I ++)
{
// Output the <p> tag on the page
Panel1.controls. Add (New literalcontrol ("<p> "));
Textbox T = new Textbox ();
T. Text = "textbox" + I. tostring ();
T. ID = "textbox" + I. tostring ();
Panel1.controls. Add (t); // Add the generated text box to the panel control.
}