CSS代码:

 body
{
font-size:11pt;
font-family:宋体;
}
.mainTitle
{
font-size:11pt;
font-weight:bold;
font-family:宋体;
}
.commonText
{
font-size:11pt;
font-family:宋体;
}
.littleMainTitle
{
font-size:10pt;
font-weight:bold;
font-family:宋体;
}
.TopTitle
{
border:0px;
font-size:10pt;
font-weight:bold;
text-decoration:none;
color:Black;
display:inline-block;
width:%;
}
.SelectedTopTitle
{
border:0px;
font-size:10pt;
text-decoration:none;
color:Black;
display:inline-block;
width:%;
background-color:White;
}
.ContentView
{
border:0px;
padding:3px 3px 3px 3px;
background-color:White;
display:inline-block;
width:390px;
}
.SepBorder
{
border-top-width:0px;
border-left-width:0px;
font-size:1px;
border-bottom:Gray 1px solid;
border-right-width:0px;
}
.TopBorder
{
border-right: Gray 1px solid;
border-top:Gray 0px solid;
border-left:Gray 1px solid;
border-bottom:Gray 1px solid;
height:%;
width:%;
}
.SelectedTopBorder
{
border-right: Gray 1px solid;
border-top:Gray 1px solid;
background:none transparent scroll repeat % %;
border-left:Gray 1px solid;
color:Black;
border-bottom: Gray 0px solid;
}

aspx代码:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MultiView控件.aspx.cs" Inherits="WebApplication1.复合控制和模板页.MultiView控件" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<link href="../Styles/01.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<div>
<fieldset style="width:400px";>
<legend>MultiView应用例子</legend>
<table cellpadding="" cellspacing="" width="100%" border="">
<tr>
<td>
<table id="Table1" runat="server"
cellpadding="" cellspacing=""
width="100%" border="">
<tr style="height:22px">
<td class="SelectedTopBorder" id="Cell1" align="center" style="width:80px;">
<asp:LinkButton ID="LButtonCompany" runat="server"
OnClick="LButtonCompany_Click">公司介绍</asp:LinkButton>
</td>
<td class="SepBorder" style="width:2px; height:22px;"></td>
<td class="TopBorder" id="Cell2" align="center" style="width:80px;">
<asp:LinkButton ID="LButtonProduct" runat="server"
OnClick="LButtonProduct_Click">产品介绍</asp:LinkButton></td> <td class="SepBorder" style="width:2px; height:22px;"></td>
<td class="TopBorder" id="Cell3" align="center" style="width:80px;">
<asp:LinkButton ID="LButtonContact" runat="server"
OnClick="LButtonContact_Click">联系我们</asp:LinkButton></td>
<td class="SepBorder" style="width:2px; height:22px;"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table class="ContentBorder" cellpadding=""
cellspacing="" width="100%">
<tr>
<td valign="top">
<asp:MultiView ID="mvCompany" runat="server" ActiveViewIndex="">
<asp:View ID="View1" runat="server">
我们公司是一个正在上升时期的公司。公司目前有中科院计算机院士3人,博士后32人,
博士63人,研究生120人,本科生356人,具有非常强大的研发实力。
</asp:View>
<asp:View ID="View2" runat="server">
我们有丰富的产品线,还可以为用户单独制定。目前CMS文章发布系统,CRM客户资源关系管理系统,
OA自动办公化系统,正在研发的软件有GSP车辆定位导航系统及工作制度系统。
</asp:View>
<asp:View ID="View3" runat="server">
本公司热烈欢迎技术界和销售界的精英加入我们,客服电话123445.
</asp:View>
</asp:MultiView>
</td>
</tr>
</table>
</td>
</tr>
</table>
</fieldset>
</div>
</form>
</body>
</html>

CS代码:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls; namespace WebApplication1.复合控制和模板页
{
public partial class MultiView控件 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{ } protected void LButtonCompany_Click(object sender, EventArgs e)
{
mvCompany.ActiveViewIndex = ;
Cell1.Attributes["class"] = "SelectedTopBorder";
Cell2.Attributes["class"]="TopBorder";
Cell3.Attributes["class"] = "TopBorder";
} protected void LButtonProduct_Click(object sender, EventArgs e)
{
mvCompany.ActiveViewIndex = ;
Cell1.Attributes["class"] = "TopBorder";
Cell2.Attributes["class"] = "SelectedTopBorder";
Cell3.Attributes["class"] = "TopBorder";
} protected void LButtonContact_Click(object sender, EventArgs e)
{
mvCompany.ActiveViewIndex = ;
Cell1.Attributes["class"] = "TopBorder";
Cell2.Attributes["class"] = "TopBorder";
Cell3.Attributes["class"] = "SelectedTopBorder";
} }
}

MultiView空间例子的更多相关文章

  1. oracle undo表空间大小修改

    redhat:清空回收站 rm -rf  /home/登录用户名/.Trash 例子:rm -rf /home/.Trash-root df命令可以显示目前所有文件系统的可用空间及使用情形: 例子:d ...

  2. Oracle 创建表空间和用户

    创建用户: 建立表空间和用户的步骤: 用户 建立:create user 用户名 identified by "密码"; 授权:grant create session to 用户 ...

  3. oracle中表空间管理,游标

    一.表空间 oracle使用表空间来管理数据库的对象(表,序列,过程,函数,游标等). oracle的逻辑结构(看不见的):oracle数据库 => 表空间 => 表 序列  过程等对象. ...

  4. sed 模式空间 保持空间

    sed之所以能以行为单位的编辑或修改文本,其原因在于它使用了两个空间:一个是活动的"模式空间(pattern space)",另一个是起辅助作用的"保持空间(hold s ...

  5. python之基本数据类型

    Python运算符及基本数据类型 运算符: 1.算数运算 2. 比较运算 3. 赋值运算 4. 逻辑运算 5. 成员运算 基本数据类型: 1. 数字 int(整型) 在32位机器上,整数的位数为32位 ...

  6. Linux程序存储结构与进程结构堆和栈的区别【转】

    转自:http://www.hongkevip.com/caozuoxitong/Unix_Linux/24581.html 红客VIP(http://www.hongkevip.com):Linux ...

  7. linux spi驱动开发学习-----spidev.c和spi test app

    一.spidev.c文件 看一个设备驱动的方法: module_init标识的入口初始化函数spidev_init,(module_exit标识的出口函数) 设备与设备驱动匹配时候调用的probe方法 ...

  8. CPU制造工艺 级选来决定cpu等级

    CPU制造工艺 编辑 CPU制造工艺又叫做CPU制程,它的先进与否决定了CPU的性能优劣.CPU的制造是一项极为复杂的过程,当今世上只有少数几家厂商具备研发和生产CPU的能力.CPU的发展史也可以看作 ...

  9. Flexbox(弹性盒模型)完全指南

    Flexbox(弹性盒模型)布局完全指南 Github:sueRimn 来源:A guide to Flexbox 这个指南讲诉了flexbox的所有内容,重点介绍了父元素(flex容器)和子元素(f ...

随机推荐

  1. HTML系列(四):编辑图像

    一.图像的基本概念 1.矢量图:文件占用空间小,放大后图像不会失真,和分辨率无关.适用于图形设计.文字设计.标志设计.版式设计等. 2.位图:由像素点组成,文件较大,放大和缩小图像会失真. 3.有损压 ...

  2. Android学习笔记_点九绘图与软键盘和事件传递

    最近项目里遇到的几个小问题,以前只是用吗没有深入看过,现在总结到一起,防止以后这种小问题占用太多时间.还是通过网上别人总结的很多博客学习了,挑选出最易懂明了的. 还有leader很小的问题都不放过,亲 ...

  3. NET项目反编译+VS解决方案整理流程

    net项目反编译 工具:De4Dot + IL SPY和Reflector结合使用 项目:vs10+创建解决方案,每个类库尽量按照dll名来命名,方便整合,新建web项目先把aspx等文件拷贝进去,注 ...

  4. 最新版SDWebImage的使用

    我之前写过一篇博客,介绍缓存处理的三种方式,其中最难,最麻烦,最占内存资源的还是图片缓存,最近做的项目有大量的图片处理,还是采用了SDWebImage来处理,但是发现之前封装好的代码报错了.研究发现, ...

  5. Apache 编译扩展的方法

    下载源码包 进入源码包的modules目录 选择你要编译的.c文件 eg: /home/work/local/apache/bin/apxs -c -i -a mod_proxy_http.c 选项说 ...

  6. C++の友元の例

    #include<iostream> #include<cmath> using namespace std; class Point { public: Point(doub ...

  7. 学会了 C 语言真的可以开发出很多东西吗?

    马里奥碰到花朵就变身. 什么是马里奥?一个装着 16 × 32 个小色块的长方形,其中一些色块填着颜色,另一些没有.什么是花?一个 16 × 16 的正方形.什么是「变身」?把马里奥这个方块里面代表衣 ...

  8. MySQL Select 优化

    准备: create table t(x int primary key,y int unique,z int); insert into t(x,y,z) values(1,1,1),(2,2,2) ...

  9. linux下通过脚本实现自动重启程序的方法

    无论什么程序都不可能完美无缺,理论上,任何程序都有 Core Dump 的一天,正式运营的程序,尤其是服务器程序,一旦 Core Dump ,后果不堪设想,有过服务器开发经验的朋友,一定都经历过深夜美 ...

  10. CF R303 div2 C. Woodcutters

    C. Woodcutters time limit per test 1 second memory limit per test 256 megabytes input standard input ...