Modify the ASP.NET document hello.aspx to use raio buttons to ge the marital sta
ID: 3815156 • Letter: M
Question
Modify the ASP.NET document hello.aspx to use raio buttons to ge the marital staus of the user (single, married, divorced, widowed) and display the results
<!--hello.aspx
<%@ Page language= "c#" %>
<html>
<head> <title> Hello </title>
</head>
<body>
<form runat = "server">
<p>
Your name:
<asp: textbox id = "name" runat = "server" />
<br />
Your age:
<asp: textbox id = "age" runat = "server" />
<br />
<asp; button id = "submit" runat = "server"
text = "submit" />
<br />
<% if (IspostBack) { %>
Hello <% name.Text %> <br />
You are <% = age.Text %> yers old <br />
<% } %>
</p>
</form>
</body>
</html>
Explanation / Answer
<!--hello.aspx
<%@ Page language= "c#" %>
<html>
<head> <title> Hello </title>
</head>
<body>
<form runat = "server">
<p>
Your name:
<asp: textbox id = "name" runat = "server" />
<br />
Your age:
<asp: textbox id = "age" runat = "server" />
<br />
<asp:RadioButton ID="rbMale" GroupName="Gender" Text="Male" runat="server" />
<br />
<asp:RadioButton ID="rbFemale" GroupName="Gender" Text="Female" runat="server" />
<br />
<asp; button id = "submit" runat = "server"
text = "submit" />
<br />
<% if (IspostBack) { %>
Hello <% name.Text %> <br />
You are <% = age.Text %> yers old <br />
You are <% if(rbMale.checked) { rbMale.Text } else { rbFemale.Text} %> <br />
<% } %>
</p>
</form>
</body>
</html>
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.