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
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
相关文章推荐
- Menu+MultiView 实现Tab(不使用图片)
- Menu+MultiView 实现Tab(不使用图片)
- ASP.NET中使用MultiView和View以及Menu实现Tablecontrol的功能
- android:使用fragment实现tab切换
- 使用jqzoom来实现图片放大镜的效果
- FormData实现上传多图片,学习使用FormData
- iOS开发-使用AFN实现GET/POST请求,以及文件下载/文件(图片)上传
- 使用纯生js实现图片轮换
- PHP中使用imagick实现把PDF转成图片
- ListView异步加载图片是非常实用的方法,凡是是要通过网络获取图片资源一般使用这种方法比较好,用户体验好,下面就说实现方法,先贴上主方法的代码:
- fresco如何配合PhotoView使用实现图片缩放
- React Native使用fetch实现图片上传的示例代码
- 使用Fragment实现Tab切换(高仿微信主界面)
- 关于使用阿里云服务调用识别身份证图片、营业执照的信息抓取接口的简单实现
- Asp.net网站使用HttpHandler实现图片防盗链功能
- 使用 CSS3 实现 3D 图片滑块效果
- 使用Javascript简单实现图片无缝滚动
- 使用storyboard,设置tab bar Item的选中图片(selected Image)
- directshow中使用StretchDIBits和AlphaBlend实现ARGB32图片的无损缩放
- 使用css样式实现动态图片裁剪示例