For your final project, you are to create a two-page web application of your cho
ID: 3782551 • Letter: F
Question
For your final project, you are to create a two-page web application of your choice. ASP.NET : C#
You must include the following items:
At least 5 different standard server controls
At least 2 validation controls
At least 1 navigation control ~ one must navigate back and forth to each page
One session state element
Upon completion of your two-page web application, you will provide a two page report describing the functions of the web application as well as each control that you have included in your design.
Explanation / Answer
A)
<%@ Page Language="C#" %>
<script runat="server">
void Button1_Click(Object sender, EventArgs e) {
Label1.Text = "Page is valid!";
}
</script>
<html>
<head>
</head>
<body>
<form runat="server">
<p>
<asp:TextBox id="TextBox1"
runat="server"></asp:TextBox>
<asp:RequiredFieldValidator
id="RequiredFieldValidator1" runat="server"
ErrorMessage="Required!"
ControlToValidate="TextBox1">
</asp:RequiredFieldValidator>
</p>
<p>
<asp:Button id="Button1"
runat="server" Text="Button"></asp:Button>
</p>
<p>
<asp:Label id="Label1" runat="server"></asp:Label>
</p>
</form>
</body>
</html>
Function CheckForm
{
for(var intCtr = 0; intCtr <= (form.elements.length - 5); ++intCtr)
{
var temp = form.elements[intCtr];
if(temp.type == "text" && temp.value == "")
{
alert("Please Enter All Information!");
temp.focus();
return false;
}
}
return true;
}
Navigation:
<ul class="nav navbar-nav">
<li><a runat="server" href="~/">Home</a></li>
<li><a runat="server" href="~/About">About</a></li>
<li><a runat="server" href="~/Contact">Contact</a></li>
<li><a runat="server" href="~/ProductList">Products</a></li>
<ul>
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.