mainlink.ascx

来自「ASP.NET Web Forms Techniques」· ASCX 代码 · 共 31 行

ASCX
31
字号
 <%@Control Language="C#" EnableViewState="False"%>

<script runat="server">

// control property set from ASPX page:
public String CurrentPageLink = "";

void Page_Load() {

  try {
    // remove <a> from page - also removes child <img> element
    String sCurrent = CurrentPageLink.ToUpper();
    HtmlAnchor oLink = (HtmlAnchor)FindControl("a" + sCurrent);
    oLink.Visible = false;
  }
  catch {}
}

</script>

<a id="aHOME" runat="server" Title="Back to List of Models" href="../home.aspx">
 <img src="images/btn_home.gif" width="100" height="49" hspace="3" vspace="2" alt="Home Page" border="0" /></a>
<a id="aCOMPARE" runat="server" Title="Compare Vehicle Models" href="../compare.aspx">
 <img src="images/btn_compare.gif" width="100" height="49" hspace="3" vspace="2" alt="Compare Models" border="0" /></a>
<a id="aCONTACT" runat="server" Title="Contact and Feedback Details" href="../contact.aspx">
 <img src="images/btn_contact.gif" width="100" height="49" hspace="3" vspace="2" alt="Contact Us" border="0" /></a>
<a id="aTANDC" runat="server" Title="Terms and Conditions of Trading" href="../tandc.aspx">
 <img src="images/btn_tandc.gif" width="100" height="49" hspace="3" vspace="2" alt="Terms and Conditions" border="0" /></a>
<a id="aMYCARS" runat="server" Title="View My Cars and Configurations" href="../secure/mycars.aspx">
 <img src="images/btn_mycars.gif" width="100" height="49" hspace="3" vspace="2" alt="My Cars" border="0" /></a>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?