Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

ASPX--When a user clicks the \"login\" button a login form pops up. I need help

ID: 3819593 • Letter: A

Question

ASPX--When a user clicks the "login" button a login form pops up.

I need help creating code for the form and linking it to the button in aspx

This is the code for the button so far. <a href="#">Login</a> . Since this is the 4 phase the button has to execute.

u tas shown in figure 2.2) in the pport and the Wher De must be displayed. page 21). et th A Red Quest on m login pageonte Figure 2.1 ogin to your account these boxes are normal Email asp TextBox components. except for the password where the TextMode mast set to "Password e mann Caacel Login Forgot your usemame ot password Takes to une recover password page (Figure Figure 2.2 See page 4 for details. Takes to the Sign Up page (figure

Explanation / Answer

<script runat="server">
protected void Page_Load(object sender, EventArgs e) {
if (!Page.IsPostBack) {
MyRadioButtonList.DataSource = MyDataSource();
MyRadioButtonList.DataValueField = "Value";
MyRadioButtonList.DataTextField = "Text";
MyRadioButtonList.DataBind();
}
}
public static System.Data.DataTable MyDataSource() {
System.Data.DataTable MyDataTable = new System.Data.DataTable();
MyDataTable.Columns.Add("value"); MyDataTable.Columns.Add("text"); MyDataTable.Columns.Add("color"); MyDataTable.Columns.Add("year");


MyDataTable.Rows.Add("http://www.foxnews.com/", "1. FoxNews");
MyDataTable.Rows.Add("http://www.yahoo.com/", "2. Yahoo");
MyDataTable.Rows.Add("http://www.cnn.com/", "3. CNN");
MyDataTable.Rows.Add("http://www.microsoft.com/", "4. Microsoft");
return MyDataTable;
}


protected void MyButton_Click(object sender, EventArgs e) {
MyLabel.Text = MyRadioButtonList.SelectedValue;
//How do I call the link stored in the selected value?
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>RadioButtonList Example</title>
<style type="text/css">
</style>
</head>
<body>
<form runat="server">
<asp:RadioButtonList ID="MyRadioButtonList" runat="server"/><p />
<asp:Button ID="MyButton" runat="server" Text="Button" /><p/>
Link To: <asp:Label id="MyLabel" runat="server"/><p/>
</form>
</body>
</html>

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote