CSS代码:

  1. body
  2. {
  3. font-size:11pt;
  4. font-family:宋体;
  5. }
  6. .mainTitle
  7. {
  8. font-size:11pt;
  9. font-weight:bold;
  10. font-family:宋体;
  11. }
  12. .commonText
  13. {
  14. font-size:11pt;
  15. font-family:宋体;
  16. }
  17. .littleMainTitle
  18. {
  19. font-size:10pt;
  20. font-weight:bold;
  21. font-family:宋体;
  22. }
  23. .TopTitle
  24. {
  25. border:0px;
  26. font-size:10pt;
  27. font-weight:bold;
  28. text-decoration:none;
  29. color:Black;
  30. display:inline-block;
  31. width:%;
  32. }
  33. .SelectedTopTitle
  34. {
  35. border:0px;
  36. font-size:10pt;
  37. text-decoration:none;
  38. color:Black;
  39. display:inline-block;
  40. width:%;
  41. background-color:White;
  42. }
  43. .ContentView
  44. {
  45. border:0px;
  46. padding:3px 3px 3px 3px;
  47. background-color:White;
  48. display:inline-block;
  49. width:390px;
  50. }
  51. .SepBorder
  52. {
  53. border-top-width:0px;
  54. border-left-width:0px;
  55. font-size:1px;
  56. border-bottom:Gray 1px solid;
  57. border-right-width:0px;
  58. }
  59. .TopBorder
  60. {
  61. border-right: Gray 1px solid;
  62. border-top:Gray 0px solid;
  63. border-left:Gray 1px solid;
  64. border-bottom:Gray 1px solid;
  65. height:%;
  66. width:%;
  67. }
  68. .SelectedTopBorder
  69. {
  70. border-right: Gray 1px solid;
  71. border-top:Gray 1px solid;
  72. background:none transparent scroll repeat % %;
  73. border-left:Gray 1px solid;
  74. color:Black;
  75. border-bottom: Gray 0px solid;
  76. }

aspx代码:

  1. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MultiView控件.aspx.cs" Inherits="WebApplication1.复合控制和模板页.MultiView控件" %>
  2.  
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4.  
  5. <html xmlns="http://www.w3.org/1999/xhtml">
  6. <head runat="server">
  7. <title></title>
  8. <link href="../Styles/01.css" rel="stylesheet" type="text/css" />
  9. </head>
  10. <body>
  11. <form id="form1" runat="server">
  12. <div>
  13. <fieldset style="width:400px";>
  14. <legend>MultiView应用例子</legend>
  15. <table cellpadding="" cellspacing="" width="100%" border="">
  16. <tr>
  17. <td>
  18. <table id="Table1" runat="server"
  19. cellpadding="" cellspacing=""
  20. width="100%" border="">
  21. <tr style="height:22px">
  22. <td class="SelectedTopBorder" id="Cell1" align="center" style="width:80px;">
  23. <asp:LinkButton ID="LButtonCompany" runat="server"
  24. OnClick="LButtonCompany_Click">公司介绍</asp:LinkButton>
  25. </td>
  26. <td class="SepBorder" style="width:2px; height:22px;"></td>
  27. <td class="TopBorder" id="Cell2" align="center" style="width:80px;">
  28. <asp:LinkButton ID="LButtonProduct" runat="server"
  29. OnClick="LButtonProduct_Click">产品介绍</asp:LinkButton></td>
  30.  
  31. <td class="SepBorder" style="width:2px; height:22px;"></td>
  32. <td class="TopBorder" id="Cell3" align="center" style="width:80px;">
  33. <asp:LinkButton ID="LButtonContact" runat="server"
  34. OnClick="LButtonContact_Click">联系我们</asp:LinkButton></td>
  35. <td class="SepBorder" style="width:2px; height:22px;"></td>
  36. </tr>
  37. </table>
  38. </td>
  39. </tr>
  40. <tr>
  41. <td>
  42. <table class="ContentBorder" cellpadding=""
  43. cellspacing="" width="100%">
  44. <tr>
  45. <td valign="top">
  46. <asp:MultiView ID="mvCompany" runat="server" ActiveViewIndex="">
  47. <asp:View ID="View1" runat="server">
  48. 我们公司是一个正在上升时期的公司。公司目前有中科院计算机院士3人,博士后32人,
  49. 博士63人,研究生120人,本科生356人,具有非常强大的研发实力。
  50. </asp:View>
  51. <asp:View ID="View2" runat="server">
  52. 我们有丰富的产品线,还可以为用户单独制定。目前CMS文章发布系统,CRM客户资源关系管理系统,
  53. OA自动办公化系统,正在研发的软件有GSP车辆定位导航系统及工作制度系统。
  54. </asp:View>
  55. <asp:View ID="View3" runat="server">
  56. 本公司热烈欢迎技术界和销售界的精英加入我们,客服电话123445.
  57. </asp:View>
  58. </asp:MultiView>
  59. </td>
  60. </tr>
  61. </table>
  62. </td>
  63. </tr>
  64. </table>
  65. </fieldset>
  66. </div>
  67. </form>
  68. </body>
  69. </html>

CS代码:

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using System.Web.UI;
  6. using System.Web.UI.WebControls;
  7.  
  8. namespace WebApplication1.复合控制和模板页
  9. {
  10. public partial class MultiView控件 : System.Web.UI.Page
  11. {
  12. protected void Page_Load(object sender, EventArgs e)
  13. {
  14.  
  15. }
  16.  
  17. protected void LButtonCompany_Click(object sender, EventArgs e)
  18. {
  19. mvCompany.ActiveViewIndex = ;
  20. Cell1.Attributes["class"] = "SelectedTopBorder";
  21. Cell2.Attributes["class"]="TopBorder";
  22. Cell3.Attributes["class"] = "TopBorder";
  23. }
  24.  
  25. protected void LButtonProduct_Click(object sender, EventArgs e)
  26. {
  27. mvCompany.ActiveViewIndex = ;
  28. Cell1.Attributes["class"] = "TopBorder";
  29. Cell2.Attributes["class"] = "SelectedTopBorder";
  30. Cell3.Attributes["class"] = "TopBorder";
  31. }
  32.  
  33. protected void LButtonContact_Click(object sender, EventArgs e)
  34. {
  35. mvCompany.ActiveViewIndex = ;
  36. Cell1.Attributes["class"] = "TopBorder";
  37. Cell2.Attributes["class"] = "TopBorder";
  38. Cell3.Attributes["class"] = "SelectedTopBorder";
  39. }
  40.  
  41. }
  42. }

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. sass 语法实例

    sass基本语法 1.定义一个变量,变量定义以$开头,以冒号分隔开. $blue:#1875e7; div{ color:$blue; } 编译之后的css代码: div { color: #1875 ...

  2. 重启sql server服务两种方式

    1.第一种重启SQl server的方法 点击左侧的数据库重启 如图 右击有个重启操作 2.第二个重启sql server方法

  3. C#委托的简单剖析

    为什么在Button1的Click事件发生之后,button1_Click方法就会被调用呢? 实际上,在我们双击Button1的时候,IDE自动的添加了一段代码,该段代码位于“Form1.Design ...

  4. BZOJ 3774: 最优选择( 最小割 )

    最小割...二分染色然后把颜色不同的点的源汇反过来..然后就可以做了. 某个点(x,y): S->Id(x,y)(回报), Id(x,y)->T(代价), Id(i,j)&& ...

  5. IO之读入文件

    整个java.io包中最重要的就是5个类和一个接口,5个类指的是File,OutputStream,InputStream,Reader,Writer:一个接口是Serializable. 在整个io ...

  6. 用SCMD2.0.8.0汉化版制作OB地图简易教程

    [综合] [复制链接]     Fenix_king       153 主题 0 好友 1万 积分 金星 该用户从未签到 星币 6392 水晶 0 星望 22 精华 0 发消息 电梯直达 楼主   ...

  7. QT 下把编辑框内的中文字符转换为 char*

    第一种方法 QString str(tr("你好")); wchar_t wc[100] = {0}; pEditShortDes->text().toWCharArray( ...

  8. 用extundelete恢复rm -rf删的文件

    “慎用rm -rf命令,除非你知道此命令带来的后果.”这是一条Linux用户守则,虽然大多数用户都明白这条语句的含义,但是我觉得还需要完善一下,为这条语句加 上一个使用前提:在你确认自己拥有清醒头脑, ...

  9. BZOJ 4300 绝世好题(位运算)

    [题目链接] http://www.lydsy.com/JudgeOnline/problem.php?id=4300 [题目大意] 给出一个序列a,求一个子序列b,使得&和不为0 [题解] ...

  10. perl笔记

    更精确的空白字符串匹配 1.水平空白字符 Perl5.10之前,使用\s这种分类,不够精确,容易导致意料外的结果: Perl5.10中引入\h字符组,用来匹配任意水平空白字符(包括Unicode字符集 ...