C# Web项目跟据下拉框文本值改变显示数据

 前端代码:

<body>
    <form id="form1" runat="server">
        <div>
            <asp:Label ID="Label1" runat="server" Text="标题"></asp:Label><asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><br />
            <asp:Label ID="Label2" runat="server" Text="作者"></asp:Label><asp:TextBox ID="TextBox2" runat="server"></asp:TextBox><br />
            <asp:Label ID="Label3" runat="server" Text="内容"></asp:Label><asp:TextBox ID="TextBox3" runat="server"></asp:TextBox><br />  
            <asp:Label ID="Label4" runat="server" Text="类型"></asp:Label><asp:DropDownList ID="DropDownList1" runat="server"></asp:DropDownList><br />
            <asp:Button ID="Button1" runat="server" Text="添加" OnClick="Button1_Click"/>
        </div>
                      <table border="1" style="width:500px;table-layout:fixed">
                          <%-- table-layout:fixed 固定width 不随th增长 --%>
                <tr>
                    <th>标题</th>
                    <th>作者</th>
                    <th>内容</th>
                    <th>类型</th>
                </tr>
            <asp:Repeater ID="Repeater1" runat="server">
                <ItemTemplate>
                    <tr>
                    <th><%# Eval("title") %></th>
                    <th><%# Eval("author") %></th>
                        <%--white-space:nowrap 文字不换行
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值