您的位置:首页 > 其它

Menu+MultiView 实现Tab(不使用图片)

2007-04-21 16:13 260 查看
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Multiview.aspx.cs" Inherits="Test_AspNet20_Default" %>

2

3<html xmlns="http://www.w3.org/1999/xhtml">

4<head runat="server">

5 <title>Tab</title>

6 <link rel="stylesheet" href="tabber.css" type="text/css" media="screen" />

7</head>

8<body>

9 <form id="form1" runat="server">

10 <center>

11 <table border="0" cellpadding="0" cellspacing="0">

12 <tr>

13 <td>

14 <table border="0" cellpadding="0" cellspacing="0" width="100%">

15 <tr>

16 <td class="tabbernav1">

17  

18 </td>

19 <td class="tabbernav">

20 <asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" OnMenuItemClick="Menu1_MenuItemClick">

21 <Items>

22 <asp:MenuItem Text="吴锋" Value="0" Selected="True"></asp:MenuItem>

23 <asp:MenuItem Text="吴锋" Value="1"></asp:MenuItem>

24 <asp:MenuItem Text="吴锋" Value="2"></asp:MenuItem>

25 </Items>

26 <StaticMenuItemStyle CssClass="tabItem" BorderWidth="2px" />

27 <StaticSelectedStyle CssClass="tabSelected" />

28 <StaticHoverStyle CssClass="tabHover" />

29 </asp:Menu>

30 </td>

31 <td class="tabbernav2">

32  

33 </td>

34 </tr>

35 </table>

36 </td>

37 </tr>

38 <tr>

39 <td class="tabcontent">

40 <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">

41 <asp:View ID="Tab1" runat="server">

42 <table width="600" height="400" cellpadding="0" cellspacing="0">

43 <tr valign="top">

44 <td class="TabArea" style="width: 600px">

45 TAB VIEW 1

46 </td>

47 </tr>

48 </table>

49 </asp:View>

50 <asp:View ID="Tab2" runat="server">

51 <table width="600px" height="400px" cellpadding="0" cellspacing="0">

52 <tr valign="top">

53 <td class="TabArea" style="width: 600px">

54 TAB VIEW 2

55 </td>

56 </tr>

57 </table>

58 </asp:View>

59 <asp:View ID="Tab3" runat="server">

60 <table width="600px" height="400px" cellpadding="0" cellspacing="0">

61 <tr valign="top">

62 <td class="TabArea" style="width: 600px">

63 TAB VIEW 3

64 </td>

65 </tr>

66 </table>

67 </asp:View>

68 </asp:MultiView>

69 </td>

70 </tr>

71 </table>

72 </center>

73 </form>

74</body>

75</html>

76

77using System;

78using System.Data;

79using System.Configuration;

80using System.Collections;

81using System.Web;

82using System.Web.Security;

83using System.Web.UI;

84using System.Web.UI.WebControls;

85using System.Web.UI.WebControls.WebParts;

86using System.Web.UI.HtmlControls;

87

88public partial class Test_AspNet20_Default : System.Web.UI.Page

89

//tabber.css

.tabItem

.tabSelected

.tabHover

.tabbernav

.tabbernav1

.tabbernav2

.tabcontent
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: