目標:將html網頁鏈接到Microsoft訪問文件。此訪問文件非常大,並且具有標題爲:客戶名稱,訂單號,街道地址,追蹤號碼和驗證日期的列。對於網頁,我們希望asp文本框和按鈕可以搜索後端的微軟訪問文件。新來asp和不明白爲什麼我的文本框不可見
我們使用微軟表達式4來編寫.aspx文件,並且它在設計視圖中正確呈現我們想要的。但是,在複製代碼(.aspx文件)並將其放入notepad ++並將其另存爲html文件後,瀏覽器窗口中將看不到按鈕。如何將.aspx文件轉換爲在瀏覽器上呈現?謝謝!
下面是代碼:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<% @ Page Language="C#" %>
<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Returns Received Report</title>
<style type="text/css">
.auto-style1 {
font-size: xlarge;
}
.auto-style2 {
text-align: center;
}
.auto-style3 {
margin-left: 0px;
}
.auto-style4 {
margin-left: 280px;
}
.auto-style5 {
margin-left: 0px;
margin-bottom: 0px;
}
</style>
</head>
<body>
<div class="auto-style2">
<body bgcolor="#black"><p></p>
<div class="auto-style2">
<br />
<br />
<strong><span class="auto-style1"><u>Search for a Return:</u><br/>
<br />
</span></strong>
</div>
<form id="form1" runat="server">
<div class="auto-style4">
<asp:TextBox id="Customer" runat="server" Visible="true" Width="261px" CssClass="auto-style5" Height="22px" BackColor="Black" BorderColor="Black"></asp:TextBox>
<asp:Button id="Button1" runat="server" Visible="true" PostBackUrl="Customer.aspx" Text="Search by Customer" BorderStyle="Outset" />
</div>
<br />
<br />
<asp:TextBox id="PO" runat="server" Visible="true" Width="261px" EnableViewState="True"></asp:TextBox>
<asp:Button id="Button2" runat="server" Visible="true" PostBackUrl="Order Number.aspx" Text="Search by Order Number" BorderStyle="Outset" Width="181px" />
<br />
<br />
<asp:TextBox id="ADDRESS" runat="server" Visible="true" Width="261px"></asp:TextBox>
<asp:Button id="Button3" runat="server" PostBackUrl="Street_Address.aspx" Text="Search by Street Address" BorderStyle="Outset" Width="181px" />
<br />
<p>
<asp:TextBox id="TrackingNumber" runat="server" Visible="true" Width="261px"></asp:TextBox>
<asp:Button id="Button4" runat="server" PostBackUrl="TrackingNumber.aspx" Text="Search by Tracking Number" BorderStyle="Outset" Width="181px" />
</p>
<p>
<asp:TextBox id="VerifiedDate" runat="server" Visible="true" Width="261px" CssClass="auto-style3"></asp:TextBox>
<asp:Button id="Button5" runat="server" PostBackUrl="TrackingNumber.aspx" Text="Search by Verified Date" BorderStyle="Outset" Width="181px" />
</p>
<asp:TextBox runat="server" id="TextBox1"></asp:TextBox>
</div>
<p> </p>
</form>
</body>
</html>
HTML不解釋爲ASP.Net代碼。這將永遠不會工作。 –
'asp'!='asp.net' – freefaller
顯然,您對http://stackoverflow.com/questions/32529455/asp-net-controls-not-visible-in-ie8的迴應並不滿意。您需要服務器端.NET框架來執行。對於瀏覽器來說,
Igor