关于tabstrip和multipage的具体使用

下面是我使用tabstrip和multipage的具体代码,放上去一方面为那些刚使用的人提供帮助,一方面方便我自己查找。
1.HTML
<!-- 将TabStrip的TargetID指向MultiPage的ID即可 --><iewc:tabstrip id="MyTabStrip" style="FONT-SIZE: 12px; FONT-FAMILY: verdana" runat="Server" Height="25px"
                                            sepDefaultStyle
="border-bottom:solid 1px #cacccc;" tabSelectedStyle="border:solid 1px #cacccc;background:white;padding-left:5px;padding-right:5px;border-bottom:none;"
                                            tabHoverStyle
="color:red;" tabDefaultStyle="border:solid 1px #cacccc;background:#f1f3f3;padding-left:5px;padding-right:5px;" targetid="MyMultiPage">
                                            
<iewc:Tab Text="标签一"></iewc:Tab>
                                            
<iewc:TabSeparator></iewc:TabSeparator>
                                            
<iewc:Tab Text="标签二"></iewc:Tab>
                                            
<iewc:TabSeparator></iewc:TabSeparator>
                                            
<iewc:Tab Text="标签三"></iewc:Tab>
                                            
<iewc:TabSeparator defaultStyle="width:100%;"></iewc:TabSeparator>
                                        
</iewc:tabstrip><iewc:multipage id="MyMultiPage" style="BORDER-RIGHT: #cacccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: medium none; PADDING-LEFT: 5px; PADDING-BOTTOM: 5px; BORDER-LEFT: #cacccc 1px solid; PADDING-TOP: 5px; BORDER-BOTTOM: #cacccc 1px solid"
                                            runat
="server" Font-Size="12px" BorderStyle="Groove" BorderWidth="0px">
                                            
<iewc:PageView id="Page3" width="100%">
                                                
<TABLE borderColor='#cccccc' cellSpacing='0' borderColorDark='#cccccc' cellPadding='3'
                                                    
width='100%' align='center' border='0'>
                                                    
<TR>
                                                        
<TD>
                                                            
<asp:Label ID="lab_page3" Runat="server"></asp:Label></TD>
                                                    
</TR>
                                                
</TABLE>
                                            
</iewc:PageView>
                                            
<iewc:PageView id="Page1" width="100%">
                                                
<TABLE borderColor='#cccccc' cellSpacing='0' borderColorDark='#cccccc' cellPadding='3'
                                                    
width='100%' align='center' border='0'>
                                                    
<TR>
                                                        
<TD>
                                                            
<asp:Label ID="Lab_page1" Runat="server"></asp:Label></TD>
                                                    
</TR>
                                                
</TABLE>
                                            
</iewc:PageView>
                                            
<iewc:PageView id="Page2" width="100%">
                                                
<TABLE style="FONT-SIZE: 8pt" cellPadding="3" width="100%">
                                                    
<TR>
                                                        
<TD>
                                                            
<asp:Label ID="lab_page2" Runat="server"></asp:Label></TD>
                                                    
</TR>
                                                
</TABLE>
                                            
</iewc:PageView>
                                        
</iewc:multipage>

2.CS
//加载Mutipages
                Label labspec=(Label)MyMultiPage.Controls[0].FindControl("Lab_page3");
                labspec.Text
="Label1";

                Label labintro
=(Label)MyMultiPage.Controls[0].FindControl("Lab_page1");
                labintro.Text
="Label2";

                Label labgifs
=(Label)MyMultiPage.Controls[0].FindControl("Lab_page2");
                labgifs.Text
="Label3";

posted @ 2006-10-21 01:07  Hermes.Liu  阅读(1435)  评论(0编辑  收藏  举报