PageLoadData.aspx

本文介绍了一个使用ASP.NET技术创建的Web表单示例,包括表单元素如文本框、验证控件及按钮等,并展示了如何通过RadioButtonList进行数据库类型的切换。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="PageLoadData.aspx.cs" Inherits="PageLoadData" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div style="text-align :center; background-color: White">
        <table id="Table1" style="background-color:#DEBA84;width:749px" border="0" cellpadding="4" cellspacing="1"
             >
            <tr>
                <td style="background-color: #DEBA84; height: 32px">
                    您的大名</td>
                <td style="background-color: #DEBA84; width: 508px; height: 32px">
                    <asp:TextBox ID="txtName" runat="server"
                         MaxLength="10" Width="519px"></asp:TextBox></td>
            </tr>
            <tr>
                <td style="background-color: #DEBA84;" colspan="1" rowspan="1" >
                    E-Mail</td>
                <td style="background-color:#DEBA84; width: 505px" >
                    <p>
                        <asp:TextBox ID="txtEmail" runat="server"
                            MaxLength="30" Width="519px"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
                            ControlToValidate="txtEmail" ErrorMessage="电子邮件格式不正确"
                            ValidationExpression="/w+([-+.']/w+)*@/w+([-.]/w+)*/./w+([-.]/w+)*"></asp:RegularExpressionValidator>
                    </p>
                </td>
            </tr>
            <tr>
                <td style="background-color:#DEBA84" colspan="1" rowspan="1">
                    内容</td>
                <td style="background-color:#DEBA84; width: 505px">
                    <p>
                        <asp:TextBox ID="txtContent" runat="server" Height="160px"
                            TextMode="MultiLine" Width="519px"></asp:TextBox></p>
                </td>
            </tr>
        </table>
        <p >
            <asp:RadioButtonList ID="radioList" runat="server" AutoPostBack="True"
                onselectedindexchanged="radioList_SelectedIndexChanged" Width="149px"
                RepeatLayout="Flow" ToolTip="请选择数据库类型">
                <asp:ListItem>XML数据库</asp:ListItem>
                <asp:ListItem>Access数据库</asp:ListItem>
            </asp:RadioButtonList>
            <asp:Button ID="btnSubmit" runat="server" OnClick="btnSubmit_Click"
                Text=" 提 交(S)" Enabled="False" AccessKey="S" ToolTip="快捷键(Alt+S)"
                Font-Size="Medium" Height="32px" Width="100px" />
            &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;
            <asp:Button ID="btnView" runat="server" OnClick="btnView_Click" Text="查 看(V)"
                Width="100px" Enabled="False" AccessKey="V" ToolTip="快捷键(Alt+V)"
                Font-Size="Medium" Height="32px" /></p>
    </div>
    </form>
</body>
</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值