2011-06-13 136 views
0
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UserCreation.aspx.cs" Inherits="UserCreation" %> 

<!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>ePay</title> 
    <style type="text/css"> 
     html, body 
     { 
       height:100%; 
       margin:0; 
       padding:0; 
       overflow: hidden; 
       width:100%; 
       background-position:center; 
       background-repeat:no-repeat; 

     } 

     #page-background {position:fixed; top:0; left:0; width:100%; height:100%;} 

     #content {position:relative; z-index:1; padding:10px;} 

     .leftAlignment 
     { 
      padding-left:10px; 
     } 

     .heading 
     { 
      padding-left:10px; 
      color:#7a7474; 
      font-size:20; 
     } 


     .content 
     { 
      padding-left:10px; 
      padding-top:20px; 
     } 


     #background img{ 
       position: absolute; 
       top: 0; 
       left: 0; 
       width: 100%; 
       height: 100%; 
       z-index: 0; 
      margin-right: 0px; 
     } 
     #bodywrap { 
       position:absolute; 
       width: 94%; 
       margin-left: 3%; 
       margin-right: 3%; 
       margin-top: 10px; 
       z-index: 20; 
     } 
     #backdrop { 
       position: absolute; 

     } 

</style> 
</head> 
<body> 
<div style="padding-top:10px;"> 
      <div id="background"> 
        <img src="images/background.jpg" alt="Background Image"/> 
      </div> 
<div id="bodywrap"> 
    <div id="backdrop"> 
    <span class="heading" > User Creation </span></div> 
    <div class="leftAlignment" ><img src="images/line.png" width="600"/></div> 
    <div class="content"> 
<form id="form1" runat="server"> 
<div> 

    <br /> 
    <asp:ScriptManager ID="ScriptManager1" runat="server"> 
    </asp:ScriptManager> 

    <asp:Panel ID="PanelUser" runat="server"> 
    <table border="0" align="center" style="position:absolute;"> 
     <tr> 
      <td> 
       Employee ID:</td> 
      <td> 
       <asp:TextBox ID="TexEmpID" runat="server" AutoPostBack="True" 
        ontextchanged="TexEmpID_TextChanged"></asp:TextBox> 
      </td> 
     </tr> 

     <tr> 
      <td>Employee Name:</td> 
      <td> 
      <asp:UpdatePanel ID="UpdatePanel1" runat="server"> 
            <ContentTemplate> 
             <asp:TextBox ID="TextEmpName" runat="server">  </asp:TextBox> 
            </ContentTemplate> 
            <Triggers> 
            <asp:AsyncPostBackTrigger ControlID="TexEmpID" EventName="TextChanged" /> 
            </Triggers> 
           </asp:UpdatePanel></td> 
     </tr> 

     <tr> 
      <td>User Name:</td> 
      <td><asp:UpdatePanel ID="UpdatePanel2" runat="server"> 
            <ContentTemplate> 
           <asp:TextBox ID="TextUserName" runat="server">  </asp:TextBox> 
            </ContentTemplate> 
            <Triggers> 
            <asp:AsyncPostBackTrigger ControlID="TexEmpID" EventName="TextChanged" /> 
            </Triggers> 
           </asp:UpdatePanel> 
      </td> 
     </tr> 

     <tr> 
      <td>Password:</td> 
      <td> 
       <asp:TextBox ID="TextPassword" runat="server" TextMode="Password"></asp:TextBox> 
           <asp:CompareValidator ID="CompareValidator1" runat="server" 
            ControlToCompare="TextPassword" ControlToValidate="TextRePassword" 
            ErrorMessage="*"></asp:CompareValidator> 

      </td> 
     </tr> 

     <tr> 
      <td>Re Type Password:</td> 
      <td> <asp:TextBox ID="TextRePassword" runat="server" TextMode="Password"></asp:TextBox></td> 
     </tr> 

     <tr> 
      <td> <asp:UpdatePanel ID="UpdatePanel3" runat="server"> 
            <ContentTemplate> 
             <asp:CheckBox ID="cbIsInactive" runat="server" Text=" Inactive" 
              Width="108px" /> 
            </ContentTemplate> 
            <Triggers> 
            <asp:AsyncPostBackTrigger ControlID="TexEmpID" EventName="TextChanged" /> 
            </Triggers> 
           </asp:UpdatePanel></td> 
      <td></td> 
     </tr> 

     <tr> 

      <td align="center"> 
       <asp:Button ID="btSubmit" runat="server" onclick="btSubmit_Click" 
        Text="Submit" /> 
      </td> 
      <td align="center"> 
       <asp:Button ID="btnReset" runat="server" Text="Reset" /> 
      </td> 

     </tr> 



    </table> 
    </asp:Panel> 

     </div> 

    </div> 
    </div> 
    </form> 
    </div> 
<p> 
    &nbsp;</p> 
</body> 
</html> 
+0

該表假設顯示一個HTML頁面? – ngen 2011-06-13 02:47:04

+0

@ngen yeahit sud.i已經把表格放在那裏,但是當我加載頁面時,它不顯示。 :( – user755673 2011-06-13 02:50:55

+0

你在瀏覽器的錯誤控制檯中是否收到任何錯誤信息?[validator](http://validator.w3.org/check)是否發現任何錯誤? – sarnold 2011-06-13 02:52:33

回答

0

你的表在這裏。問題是你的CSS這條線:

overflow: hidden; 

它使滾動條隱藏,如果需要的話。如果將其更改爲:

overflow: auto; 

並滾動一下,您將看到您的表格。其餘的由您決定,以便正確定位所有元素。

+0

coool。非常感謝。它的工作。:) – user755673 2011-06-13 08:14:10

+0

不客氣!:) – 2011-06-13 08:31:53