CSDN博客

img aliang128

tabstrip和multipage的使用

发表于2004/10/22 14:37:00  2956人阅读

分类: ASP.NET

tabstrip和multipage的使用

源作者:未知                   人气:7510
(1)首先需要安装iewebcontrols.msi
(2)然后在html代码添加<%@import namespace="Microsoft.Web.UI.WebControls" %>
<%@ Register TagPrefix="ie" Namespace="Microsoft.Web.UI.WebControls" Assembly="Microsoft.Web.UI.WebControls, Version=1.0.2.226, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
(3)下面试我开发系统的一个页面,仅供参考
<ie:tabstrip id="TabStrip1" style="Z-INDEX: 103; LEFT: 8px; POSITION: absolute; TOP: 75px" runat="server" BorderColor="LightSkyBlue" BorderStyle="Inset" TabSelectedStyle="background-color:#ffffff;color:green;" TabHoverStyle="color:red;" TabDefaultStyle="background-color:white;font-family:verdana;font-weight:bold;font-size:8pt;color:blue;width:79;height:21;text-align:center;" TargetID="MultiPage1" AutoPostBack="True">
 <ie:Tab Text="查看数据"></ie:Tab>
 <ie:Tab Text="查看图形"></ie:Tab>
</ie:tabstrip>
<ie:multipage id="MultiPage1" style="Z-INDEX: 100; LEFT: 7px; POSITION: absolute; TOP: 101px" runat="server" Height="546px" Width="796px" BorderColor="#8080FF" BorderStyle="Double">
 <ie:pageview>
  <asp:datagrid id="Datagrid1" style="Z-INDEX: 101;left: 100px;position: absolute" runat="server" Width="600px" AllowSorting="True" AutoGenerateColumns="False" BackColor="White" BorderWidth="1px" BorderStyle="None" BorderColor="#3366CC" CellPadding="4" PageSize="16" AllowPaging="False" EnableViewState="True">
  <SelectedItemStyle Font-Size="Smaller" Font-Bold="True" HorizontalAlign="Center" ForeColor="#CCFF99" VerticalAlign="Middle" BackColor="#009999"></SelectedItemStyle>
  <EditItemStyle Font-Size="Smaller" HorizontalAlign="Center" VerticalAlign="Middle"></EditItemStyle>
  <AlternatingItemStyle Font-Size="Smaller" HorizontalAlign="Center" VerticalAlign="Middle"></AlternatingItemStyle>
  <ItemStyle Font-Size="Smaller" HorizontalAlign="Center" ForeColor="#003399" VerticalAlign="Middle" BackColor="White"></ItemStyle>
  <HeaderStyle Font-Size="Smaller" HorizontalAlign="Center" ForeColor="#CCCCFF" VerticalAlign="Middle" BackColor="#003399"></HeaderStyle>
  <FooterStyle Height="1px" ForeColor="#003399" BackColor="#99CCCC"></FooterStyle>
  <Columns>
   <asp:BoundColumn DataField="stcd" HeaderText="站名"></asp:BoundColumn>
   <asp:BoundColumn DataField="ymdhm" SortExpression="ymdhm" HeaderText="时间"></asp:BoundColumn>
   <asp:BoundColumn DataField="Zr" HeaderText="水位" DataFormatString="{0:N2}"></asp:BoundColumn>
   <asp:EditCommandColumn ButtonType="LinkButton" UpdateText="&lt;img src=IMAGES/ok.gif border=0 align=absmiddle alt="更新"&gt;" HeaderText="编辑" CancelText="&lt;img src=IMAGES/cancel.gif border=0 align=absmiddle alt="取消"&gt;" EditText="&lt;img src=IMAGES/edit.gif border=0 align=absmiddle alt="编辑"&gt;"></asp:EditCommandColumn>
   <asp:ButtonColumn Text="&lt;img src=IMAGES/delete.gif border=0 id=btnRemove align=absmiddle alt="删除"&gt;" HeaderText="删除" CommandName="Delete"></asp:ButtonColumn>
  </Columns>
  <PagerStyle HorizontalAlign="Left" ForeColor="#003399" BackColor="#99CCCC"></PagerStyle>
  </asp:datagrid>
 </ie:pageview>
 <ie:pageview>
  <asp:image id="Image1" style="Z-INDEX: 104;left=10px;POSITION: absolute; TOP: 65px" runat="server" Width="401px" Height="168px"></asp:image>
 </ie:pageview>
</ie:multipage>


 


tabstrip和multipage的使用二

源作者:未知                   人气:6614

联合使用tabstrip和multipage
<iewc:TabStrip id="TabStrip1" runat="server" TabSelectedStyle="background-color:#ffffff;color:#000000"
TabHoverStyle="background-color:#777777" TabDefaultStyle="background-color:#000000;font-family:verdana;font-weight:bold;font-size:8pt;color:#ffffff;width:79;height:21;text-align:center"
Height="24px" TargetID="MultiPage1" Font-Size="10pt">
 <iewc:Tab Text="基本情况"></iewc:Tab>
 <iewc:TabSeparator></iewc:TabSeparator>
 <iewc:Tab Text="文件权限"></iewc:Tab>
 <iewc:TabSeparator></iewc:TabSeparator>
 <iewc:Tab Text="菜单权限"></iewc:Tab>
</iewc:TabStrip>
<iewc:MultiPage id="MultiPage1" runat="server" Height="398px" Width="670px">
 <iewc:pageview>
    <DIV style="BORDER-RIGHT: black 1px double; BORDER-TOP: black 1px double; BORDER-LEFT: black 1px double; WIDTH: 670px; BORDER-BOTTOM: black 1px double; HEIGHT: 398px"
  align="center"><br/>
  <br/>
  <br/>
  编号:&nbsp;&nbsp;&nbsp;&nbsp;
  <asp:textbox id="tbxID" runat="server" MaxLength="10" Width="150"></asp:textbox><br/>
  <br/>
  姓名:&nbsp;&nbsp;&nbsp;&nbsp;
  <asp:textbox id="tbxName" runat="server" MaxLength="20" Width="150"></asp:textbox><br/>
  <br/>
  电话:&nbsp;&nbsp;&nbsp;&nbsp;
  <asp:textbox id="tbxPhone" runat="server" MaxLength="30" Width="150"></asp:textbox><br/>
  <br/>
  密码:&nbsp;&nbsp;&nbsp;&nbsp;
  <asp:textbox id="tbxPass1" runat="server" MaxLength="10" TextMode="Password" Width="150"></asp:textbox><br/>
  <br/>
  重复:&nbsp;&nbsp;&nbsp;&nbsp;
  <asp:textbox id="tbxPass2" runat="server" MaxLength="10" TextMode="Password" Width="150"></asp:textbox><br/>
  <br/>  
     </DIV>
 </iewc:pageview>
 <iewc:pageview>
  <TABLE id="Table3" style="BORDER-RIGHT: black 1px double; BORDER-TOP: black 1px double; BORDER-LEFT: black 1px double; WIDTH: 670px; BORDER-BOTTOM: black 1px double; HEIGHT: 398px"
  cellSpacing="0" cellPadding="0" width="480" border="0">
  <TR>
  <TD style="WIDTH:60px"></TD>
  <TD style="WIDTH: 190px" align="center">
   <asp:listbox id="ListBox1" runat="server" Width="160px" Height="260px" DataTextField="Name" SelectionMode="Multiple"></asp:listbox></TD>
  <TD style="WIDTH: 120px" align="center"><FONT face="宋体"> <INPUT class="Button1" onclick="Add()" type="button" value="添    加" style="WIDTH: 100px"><br/>
  <br/>
  <br/>
  <INPUT class="Button1" onclick="AddAll()" type="button" value="全部添加" style="WIDTH: 100px"><br/>
  <br/>
  <br/>
  <INPUT class="Button1" onclick="Subtract()" type="button" value="移    除" style="WIDTH: 100px"><br/>
  <br/>
  <br/>
  <INPUT class="Button1" onclick="SubtractAll()" type="button" value="全部移除" style="WIDTH: 100px">
  </TD>
  <TD style="WIDTH: 190px" align="center">
   <asp:listbox id="ListBox2" runat="server" Width="160px" Height="260px" SelectionMode="Multiple"></asp:listbox>
  </TD>
  <TD style="WIDTH: 100px">
   <INPUT class="Button1" onclick="doMoveUp()" type="button" value="▲" style="WIDTH: 30px"><br/>
  <br/>
  <br/>
   <INPUT class="Button1" onclick="doMoveDown()" type="button" value="▼" style="WIDTH: 30px">
  </TD>
  </TR>
  </TABLE>
 </iewc:pageview>
 <iewc:pageview>
  <asp:datalist id="DataList1" runat="server" Width="640px" BorderStyle="Dotted" BorderWidth="1px" Font-Size="10pt">
  <ItemTemplate>
  <TABLE id="Table2" style="WIDTH: 650px; HEIGHT: 26px" cellSpacing="0" cellPadding="1" width="650" border="0">
   <TR>
    <TD bgColor="#d3d3d3">
    <asp:CheckBox id=CheckBox1 runat="server" ForeColor="darkred" ToolTip="<%# DataBinder.Eval(Container.DataItem, "ID") %>" Text="<%# DataBinder.Eval(Container.DataItem, "MenuName") %>" Font-Size="10pt">
    </asp:CheckBox>
    </TD>
   </TR>
   <TR>
    <TD>
    <asp:DataList id=DataList2 runat="server" RepeatColumns="5" DataSource="<%# ChildTable(DataBinder.Eval(Container.DataItem, "ID").ToString()) %>">
     <ItemTemplate>
      <asp:CheckBox id="Checkbox2" Width="120" runat="server" ToolTip="<%# DataBinder.Eval(Container.DataItem, "ID") %>" Text="<%# DataBinder.Eval(Container.DataItem, "MenuName") %>" Font-Size="10pt">
      </asp:CheckBox>
     </ItemTemplate>
    </asp:DataList>
    </TD>
   </TR>
  </TABLE>
  </ItemTemplate>
  <EditItemTemplate>
   <FONT face="宋体"></FONT>
  </EditItemTemplate>
  </asp:datalist>
 </iewc:pageview>
</iewc:MultiPage>


Tabstrip动态的增加一项
TabStrip1 = new Microsoft.Web.UI.WebControls.TabStrip();


Tab1 = new Microsoft.Web.UI.WebControls.Tab();
Tab2 = new Microsoft.Web.UI.WebControls.Tab();


TabStrip1.Font.Name = "Verdana";
TabStrip1.Font.Bold = false;
TabStrip1.Font.Size = 8;


Tab1.Text = "About Us";
Tab1.ID = "AboutUs";


TabStrip1.Items.Add(Tab1);


Tab2.Text = "Products and Services";
Tab2.ID = "ProductsAndServices";


TabStrip1.Items.Add(Tab2);
this.Controls.Add(TabStrip1);

 

阅读全文
0 0

相关文章推荐

img
取 消
img