⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 default.aspx

📁 这是asp.net^和Visual C++Sharp编写的串并口通讯的书籍 源代码
💻 ASPX
字号:
<%@ Page Language="C#" %>
<%@ Reference Control="~/UserControls/Spinner.ascx" %>
<%@ Reference Control="MyControl.ascx" %>
<script runat="server">
    private Controls_Spinner Spinner1;
    protected void Page_Load(object sender, EventArgs e)
    {
        //动态加载Spinner.ascx用户控件
        Spinner1 = (Controls_Spinner)LoadControl("~/UserControls/Spinner.ascx");
        Spinner1.MaxValue = 108;
        Spinner1.MinValue = 88;
        PlaceHolder1.Controls.Add(Spinner1);
        //动态加载MyControl.ascx用户控件
        MyControl ctrl = (MyControl)Page.LoadControl("MyControl.ascx");
        ctrl.LabelText = "Hello ASP.NET技术方案宝典!";
        PlaceHolder2.Controls.Add(ctrl);
}

protected void Button1_Click(object sender, EventArgs e)
{
    Label1.Text = Spinner1.CurrentNumber.ToString();
}
</script>
<html>
<head id="Head1" runat="server">
  <title>Load User Control Programmatically</title>
</head>
<body>
  <form id="form1" runat="server">
    <div>
        &nbsp;<br />
        &nbsp;<br />
      <br />
        <table align="center" style="border-left-color: #ffff66; border-bottom-color: #ffff66;
            width: 536px; border-top-style: ridge; border-top-color: #ffff66; border-right-style: ridge;
            border-left-style: ridge; border-right-color: #ffff66; border-bottom-style: ridge">
            <tr>
                <td colspan="4" style="background-image: url(images/dengluchuangkou_17.gif); height: 64px">
                   
                </td>
            </tr>
            <tr>
                <td style="background-image: url(images/dengluchuangkou_20.gif); width: 318px; height: 97px">
                </td>
                <td style="background-image: url(images/dengluchuangkou_25.gif); width: 440px; height: 97px">
                                <asp:PlaceHolder
                        ID="PlaceHolder2" runat="server"></asp:PlaceHolder>
                    <br />
                    <asp:Label ID="Label4" runat="server" Font-Size="10pt" Text="请选择您对本图书建议的价格:"></asp:Label><br />
      <asp:PlaceHolder runat=server ID="PlaceHolder1" />
                </td>
                <td align="center" style="background-image: url(images/dengluchuangkou_25.gif); width: 81px;
                    height: 97px">
      <asp:Button ID="Button1" runat="server" 
        Text="请确认您的建议价格" 
        OnClick="Button1_Click" Width="124px" /></td>
                <td align="center" style="background-image: url(images/dengluchuangkou_20.gif); width: 256px;
                    height: 97px">
                </td>
            </tr>
            <tr>
                <td colspan="4" style="background-image: url(images/dengluchuangkou_29.gif); height: 29px">
                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<asp:Label ID="Label2"
                        runat="server" Font-Size="10pt" Style="left: 43px; position: relative; top: -1px"
                        Text="您的建议价格为【"></asp:Label>
                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<asp:Label ID="Label1" runat="server" Text="" style="left: 0px; position: relative; top: -1px"></asp:Label>
                    <asp:Label ID="Label3" runat="server" Font-Size="10pt" Style="left: -2px; position: relative;
                        top: -1px" Text="】元。谢谢!"></asp:Label></td>
            </tr>
            <tr>
                <td colspan="4" style="background-image: url(images/dengluchuangkou_30.gif)">
                    &nbsp;</td>
            </tr>
        </table>
    </div>
  </form>
</body>
</html>

⌨️ 快捷键说明

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