缤纷多彩的植物信息世界

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

效果图如下:

2009-05-01_000136

1、主页面代码:

   1:  <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
   2:   
   3:  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
   4:  <html xmlns="http://www.w3.org/1999/xhtml">
   5:  <head runat="server">
   6:      <title>Untitled Page</title>
   7:  </head>
   8:  <%--<frameset rows="*,113" cols="*" frameborder="yes" border="1" framespacing="1">--%>
   9:  <frameset id="frmMain" name="top" rows="*" cols="250,*" framespacing="1" frameborder="yes"
  10:      border="1">
  11:      <frame src="Left.aspx" name="leftFrame" scrolling="Yes" >
  12:      <frame src="Right.aspx" name="mainFrame">  
  13:  </frameset>
  14:  <body>
  15:      <form id="form1" runat="server">
  16:      <div>
  17:      </div>
  18:      </form>
  19:  </body>
  20:  </html>

2、Right.aspx页面代码:

   1:  <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Right.aspx.cs" Inherits="Right" %>
   2:   
   3:  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
   4:  <html xmlns="http://www.w3.org/1999/xhtml">
   5:  <head runat="server">
   6:         <script language="javascript">
   7:          function shframe() {
   8:              if (top.frmMain.cols == "0,*") {
   9:                  top.frmMain.cols = "200,*";
  10:                  document.getElementById("ShowTree").value = "隐藏";
  11:              }
  12:              else {
  13:                  top.frmMain.cols = "0,*";
  14:                  document.getElementById("ShowTree").value = "显示";
  15:              }
  16:          }
  17:         
  18:      </script>
  19:      
  20:      <title>Untitled Page</title>
  21:  </head>
  22:  <body>
  23:      <form id="form1" runat="server">
  24:      <div>
  25:          <input type="button" style="border-width:0px" id="ShowTree" value="隐藏" onclick="javascript:shframe()" />            
  26:      </div>
  27:      <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" DataKeyNames="SPNUMBER"
  28:          DataSourceID="SqlDataSource1" Height="50px" Width="479px" CellPadding="4" ForeColor="#333333"
  29:          GridLines="None">
  30:          <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
  31:          <CommandRowStyle BackColor="#FFFFC0" Font-Bold="True" />
  32:          <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
  33:          <FieldHeaderStyle BackColor="#FFFF99" Font-Bold="True" />
  34:          <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
  35:          <Fields>
  36:              <asp:BoundField DataField="SPNUMBER" HeaderText="SPNUMBER" ReadOnly="True" SortExpression="SPNUMBER" />
  37:              <asp:BoundField DataField="Fullname" HeaderText="Fullname" SortExpression="Fullname" />
  38:              <asp:BoundField DataField="AbbreviateName" HeaderText="AbbreviateName" SortExpression="AbbreviateName" />
  39:              <asp:BoundField DataField="CITATION" HeaderText="CITATION" SortExpression="CITATION" />
  40:              <asp:BoundField DataField="YEAR" HeaderText="YEAR" SortExpression="YEAR" />
  41:          </Fields>
  42:          <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
  43:          <AlternatingRowStyle BackColor="White" />
  44:      </asp:DetailsView>
  45:      <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:CNPCEditConnectionString %>"
  46:          SelectCommand="SELECT [SPNUMBER], [Fullname], [AbbreviateName], [CITATION], [YEAR] FROM [Species] WHERE ([AbbreviateName] = @AbbreviateName)">
  47:          <SelectParameters>
  48:              <asp:QueryStringParameter Name="AbbreviateName" QueryStringField="AbbreviateName"
  49:                  Type="String" />
  50:          </SelectParameters>
  51:      </asp:SqlDataSource>
  52:      <asp:TextBox ID="TextBox1" runat="server" Height="29px" Width="295px"></asp:TextBox>
  53:      <br />
  54:      <asp:DropDownList ID="DropDownList1" runat="server" Height="25px" Width="297px">
  55:      </asp:DropDownList>
  56:      <br />
  57:      </form>
  58:  </body>
  59:  </html>

3、Left.aspx页面代码:

   1:  <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Right.aspx.cs" Inherits="Right" %>
   2:   
   3:  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
   4:  <html xmlns="http://www.w3.org/1999/xhtml">
   5:  <head runat="server">
   6:         <script language="javascript">
   7:          function shframe() {
   8:              if (top.frmMain.cols == "0,*") {
   9:                  top.frmMain.cols = "200,*";
  10:                  document.getElementById("ShowTree").value = "隐藏";
  11:              }
  12:              else {
  13:                  top.frmMain.cols = "0,*";
  14:                  document.getElementById("ShowTree").value = "显示";
  15:              }
  16:          }
  17:         
  18:      </script>
  19:      
  20:      <title>Untitled Page</title>
  21:  </head>
  22:  <body>
  23:      <form id="form1" runat="server">
  24:      <div>
  25:          <input type="button" style="border-width:0px" id="ShowTree" value="隐藏" onclick="javascript:shframe()" />            
  26:      </div>
  27:      <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" DataKeyNames="SPNUMBER"
  28:          DataSourceID="SqlDataSource1" Height="50px" Width="479px" CellPadding="4" ForeColor="#333333"
  29:          GridLines="None">
  30:          <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
  31:          <CommandRowStyle BackColor="#FFFFC0" Font-Bold="True" />
  32:          <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
  33:          <FieldHeaderStyle BackColor="#FFFF99" Font-Bold="True" />
  34:          <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
  35:          <Fields>
  36:              <asp:BoundField DataField="SPNUMBER" HeaderText="SPNUMBER" ReadOnly="True" SortExpression="SPNUMBER" />
  37:              <asp:BoundField DataField="Fullname" HeaderText="Fullname" SortExpression="Fullname" />
  38:              <asp:BoundField DataField="AbbreviateName" HeaderText="AbbreviateName" SortExpression="AbbreviateName" />
  39:              <asp:BoundField DataField="CITATION" HeaderText="CITATION" SortExpression="CITATION" />
  40:              <asp:BoundField DataField="YEAR" HeaderText="YEAR" SortExpression="YEAR" />
  41:          </Fields>
  42:          <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
  43:          <AlternatingRowStyle BackColor="White" />
  44:      </asp:DetailsView>
  45:      <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:CNPCEditConnectionString %>"
  46:          SelectCommand="SELECT [SPNUMBER], [Fullname], [AbbreviateName], [CITATION], [YEAR] FROM [Species] WHERE ([AbbreviateName] = @AbbreviateName)">
  47:          <SelectParameters>
  48:              <asp:QueryStringParameter Name="AbbreviateName" QueryStringField="AbbreviateName"
  49:                  Type="String" />
  50:          </SelectParameters>
  51:      </asp:SqlDataSource>
  52:      <asp:TextBox ID="TextBox1" runat="server" Height="29px" Width="295px"></asp:TextBox>
  53:      <br />
  54:      <asp:DropDownList ID="DropDownList1" runat="server" Height="25px" Width="297px">
  55:      </asp:DropDownList>
  56:      <br />
  57:      </form>
  58:  </body>
  59:  </html>
posted on 2009-05-01 00:08  虎克  阅读(249)  评论(0)    收藏  举报