如何使用vs2022中的ask.net写出这个页面。

img


img


利用其中的控件,将这两个页面结合起来,如果可以的话,最好从一开始回答。

这2个页面不难吧,服务器端控件或者客户端html控件都可以

登录.aspx

<%@ Page Language="C#" %>
<!DOCTYPE html>
<script runat="server">

</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta charset="utf-8"/>
    <title>登录</title>
    <style>
        h1 {
            text-align: center
        }
        table td{padding:10px}
        
        .field{text-align:center;width:215px}
    </style>
</head>
<body>
    <h1>ASP.NET开发技术基础!!!</h1>
    <form id="form1" runat="server" style="border:solid 1px #999;display:block;width:760px;margin:10px auto">
       <table>
           <tr>
               <td class="field">性别:</td>
               <td><asp:RadioButtonList runat="server" ID="sex" RepeatDirection="Horizontal">
                   <asp:ListItem></asp:ListItem>
                   <asp:ListItem></asp:ListItem>
                   </asp:RadioButtonList></td>
           </tr>
           <tr>
               <td class="field">爱好:</td>
               <td>
                   <asp:CheckBoxList runat="server" ID="hobby" RepeatDirection="Horizontal" RepeatColumns="3">
                       <asp:ListItem>读书</asp:ListItem>
                       <asp:ListItem>看电源</asp:ListItem>
                       <asp:ListItem>摄影</asp:ListItem>
                       <asp:ListItem>旅行</asp:ListItem>
                       <asp:ListItem>美食</asp:ListItem>
                       <asp:ListItem>上网</asp:ListItem>
                   </asp:CheckBoxList>
               </td>
           </tr>
           <tr>
               <td class="field">头像:</td>
               <td>
                   <select name="face" id="face" runat="server" onchange="imgFace.src=this.value">
                       <option value="http://www.nongmu168.com/images/head/0.gif">清新1</option>
                       <option value="http://www.nongmu168.com/images/head/1.gif">清新2</option>
                       <option value="http://www.nongmu168.com/images/head/2.gif">清新3</option>
                   </select>
                   <img id="imgFace" src="http://www.nongmu168.com/images/head/0.gif"  style="height:50px"/>
               </td>
           </tr>
           
           <tr>
               <td class="field">出生范围:</td>
               <td>
                   <asp:DropDownList ID="birth" runat="server" size="4">
                       <asp:ListItem>1999-2000</asp:ListItem>
                       <asp:ListItem>2000-2001</asp:ListItem>
                       <asp:ListItem>2001-2002</asp:ListItem>
                       <asp:ListItem>2002-2003</asp:ListItem>
                   </asp:DropDownList>
               </td>
               </tr>
           
           <tr>
               <td class="field">单选题:</td>
               <td>
                   <asp:RadioButtonList runat="server" ID="choice" RepeatDirection="Horizontal">
                       <asp:ListItem>A</asp:ListItem>
                       <asp:ListItem>B</asp:ListItem>
                       <asp:ListItem>C</asp:ListItem>
                       <asp:ListItem>D</asp:ListItem>
                   </asp:RadioButtonList></td>
               </tr>
       </table>
    </form>
</body>
</html>



注册.aspx

<%@ Page Language="C#" %>
<!DOCTYPE html>
<script runat="server">

</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta charset="utf-8"/>
    <title>用户注册</title>
    <style>
        h1 {
            text-align: center
        }
        table td{padding:10px}
        
        .field{text-align:center;width:50%}
    </style>
</head>
<body>
    <h1>用户注册</h1>
    <form id="form1" runat="server" style="border:solid 1px #999;display:block;width:760px;margin:10px auto">
       <table width="100%">
           <tr>
               <td class="field">姓名:</td>
               <td><asp:TextBox runat="server" ID="userName"></asp:TextBox></td>
           </tr>
           <tr>
               <td class="field">密码:</td>
               <td><asp:TextBox runat="server" ID="password" TextMode="Password"></asp:TextBox></td>
           </tr>
           <tr>
               <td class="field">留言:</td>
               <td><asp:TextBox runat="server" ID="message" TextMode="MultiLine" Rows="5" Columns="22"></asp:TextBox></td>
           </tr>
           <tr>
               <td class="field" colspan="2"><asp:Button runat="server" Text="注册" /></td>
               </tr>
           <tr>
               <td class="field">
                   我已注册成功<br />
                   我已点击该图片按钮
               </td>
               <td>
                   <img src="http://www.nongmu168.com/images/head/tom.jpg" />
               </td>
           </tr>
           <tr>
               <td class="field"><a href="注册.aspx">注册页</a></td>
               <td class="field"><a href="登录.aspx">登录页</a></td>
           </tr>
       </table>
    </form>
</body>
</html>



您好,我是有问必答小助手,您的问题已经有小伙伴帮您解答,感谢您对有问必答的支持与关注!
PS:问答VIP年卡 【限时加赠:IT技术图书免费领】,了解详情>>> https://vip.csdn.net/askvip?utm_source=1146287632