我已經嘗試下面的兩個片段。沒有。我試過<%#,<%=和<%。沒有。所以我卡住了。我的<% %>不能在div中工作。爲什麼?
<div style="background-color:Gray; color:white; text-align:center; width:100%;">
<asp:HyperLink ID="HyperLink1" Target="_blank" NavigateUrl='<%= Server.HtmlEncode(String.Format("~/ShowHistory.aspx?section={0}&jobnumber={1}", "APQP Header", "101244")) %>' runat="server">Show Updated History</asp:HyperLink>
<asp:HyperLink Target="_blank" NavigateUrl="~/ShowDeletedHistory.aspx" ID="HyperLink2" runat="server">Show Deleted History</asp:HyperLink></div>
<br />
<div style="background-color:Gray; color:white; text-align:center; width:100%;">
<asp:HyperLink ID="HyperLink1" Target="_blank" NavigateUrl='<%= String.Format("~/ShowHistory.aspx?section={0}&jobnumber={1}", "APQP Header", "101244") %>' runat="server">Show Updated History</asp:HyperLink>
<asp:HyperLink Target="_blank" NavigateUrl="~/ShowDeletedHistory.aspx" ID="HyperLink2" runat="server">Show Deleted History</asp:HyperLink></div>
<br />
「不工作」是什麼意思? – 2010-09-22 15:46:34
我的意思是,而不是超鏈接,因爲它應該,它只是文本。我看看源代碼並得到這個:
– dotnetN00b 2010-09-22 15:51:47