页面代码:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TabContainer.aspx.cs" Inherits="TabContainer" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
view plaincopy to clipboardprint?
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<cc1:TabContainer ID="TabContainer1" runat="server" Height="57px" Width="218px">
<cc1:TabPanel ID="TabPanel1" runat="server" HeaderText="爱吃的水果">
<ContentTemplate>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" >
<ContentTemplate>
<asp:Label ID="Label1" runat="server" Text="苹果"></asp:Label>
<asp:Label ID="Label2" runat="server" Text="柚子"></asp:Label>
<asp:Label ID="Label3" runat="server" Text="香蕉"></asp:Label>
</ContentTemplate>
</asp:UpdatePanel>
</ContentTemplate>
</cc1:TabPanel>
<cc1:TabPanel ID="TabPanel2" runat="server" HeaderText ="喜欢的东西">
<ContentTemplate>
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<asp:Label ID="Label4" runat="server" Text="书"></asp:Label>
<asp:Label ID="Label5" runat="server" Text="花"></asp:Label>
<asp:Label ID="Label6" runat="server" Text="阴天"></asp:Label>
</ContentTemplate>
</asp:UpdatePanel>
</ContentTemplate>
</cc1:TabPanel>
<cc1:TabPanel ID="TabPanel3" runat="server" HeaderText ="喜欢的音乐">
<ContentTemplate>
<asp:UpdatePanel ID="UpdatePanel3" runat="server">
<ContentTemplate>
<asp:Label ID="Label7" runat="server" Text="平静的"></asp:Label>
<asp:Label ID="Label8" runat="server" Text="甜蜜的"></asp:Label>
<asp:Button ID="Button1" runat="server" Text="美丽的"/>
</ContentTemplate>
</asp:UpdatePanel>
</ContentTemplate>
</cc1:TabPanel>
</cc1:TabContainer>
</div>
</form>
</body>
</html>
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/zjj780320380/archive/2010/05/12/5580877.aspx