Reference no: EM132678853
ENTD 462 Enterprise Development Using ASP.NET - American Public University
Lab 1: Using Web forms and C# (code behind) do the following:-
1) Create a page that will have a simple calculator that does the four main operations (add, subtract, divide, multiply)
2) Create 3 text boxes (first number, second number, result) 4 buttons one for each operation. Add additional button to clear the results
3) Prevent dividing by zero
4) Appraise the impact of Microsoft's Visual Studio.NET on Information Technology Management and on Global Economies as it applies to developing, deploying, and managing websites using various resources.
5) Name the form MyCalc.aspx
Compress the solution with all the files and submit it as MyCalcaspx001.zip.
Lab 2: Add a new page to the prior site to do the following :-
You are going to use JavaScript.
1) Create a page that will have a simple calculator that does the four main operations (add, subtract, divide, multiply)
2) Create 3 text boxes (first number, second number, result) 4 buttons one for each operation.
Add additional button to clear the results
3) Prevent dividing by zero
4) Explain the differences between ASP.NET web forms and JavaScript developments (pros/cons)
5) Examine the concept of managed data providers within the .NET Framework.
6) Name the page MyCalc.html
Compress the solution with all the files and submit it as MyCalchtml002.zip.
Lab 3: Add a new page to the prior site to do the following :-
You are going to use JQuery.
1) Create a page that will have a simple calculator that does the four main operations (add, subtract, divide, multiply)
2) Create 3 text boxes (first number, second number, result) 4 buttons one for each operation.
Add additional button to clear the results
3) Prevent dividing by zero
4) Create the functions as a web services
5) Explain the differences between ASP.NET web forms, JavaScript, and JQuery developments (pros/cons)
6) Name the page MyCalcJq.html
Compress the solution with all the files and submit it as MyCalcJqhtml003.zip.
Lab 4: Add a new page to the prior site to do the following :-
Review the example in lesson 5. Add a new page to the prior site to do the following :-
Here is an example;
<!DOCTYPE html>
<html>
<body>
<!-- The original example can be found-->
<p id="demo">Let AJAX change this text.</p>
<button type="button" onclick="loadDoc()">Change Content</button>
<script>
function loadDoc()
{
// declaration for the AJAX object var xhttp;
if (window.XMLHttpRequest) {
// code for modern browsers xhttp = new XMLHttpRequest();
} else {
// code for IE6, IE5
xhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xhttp.onreadystatechange = function() {
if (xhttp.readyState == 4 && xhttp.status == 200) { document.getElementById("demo").innerHTML = xhttp.responseText;
}
};
xhttp.open("get", false);
// You can use GET or POST with the open function
// true for Asyncournance
// false for Syncournance xhttp.send();
}
</script>
</body>
</html>
You are going to use Ajax.
1) Create a page that will have a simple calculator that does the four main operations (add, subtract, divide, multiply)
2) Create 3 text boxes (first number, second number, result) 4 buttons one for each operation.
Add additional button to clear the results
3) Prevent dividing by zero
4) Explain callback feature, give me an example explaining callback
5) Create the functions as a web services
6) Explain the differences between ASP.NET web forms, JavaScript, JQuery, and Ajax developments (pros/cons)
7) Make sure to review Example (Server-side and client-side example) In the lesson. Example (Server-side and client-side example)
The server-side code
Before we start, let us create an empty web site for practice.
In default.aspx code behind, copy and paste the code below (service)
protected void Page_Load(object sender, EventArgs e)
{
try
{
String outstr = "";
outstr += "<p> AJAX is not a new programming language. </p>";
outstr += "<p> AJAX is a technique for creating fast and dynamic web pages. </p>"; outstr += "<p> This file is located at the local web server </p>"; Response.Write(outstr);
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}
Compile and run the above code, if you are using the development web server, note the generated port number.
Now let us call the service from the client, here is the client code
The client side code
<!DOCTYPE html>
<html>
<body>
<p id="demo">Let AJAX change this text.</p>
<button type="button" onclick="loadDoc()">Change Content</button>
<script>
function loadDoc()
{
try
{
// declaration for the AJAX object var xhttp;
if (window.XMLHttpRequest) {
// code for modern browsers xhttp = new XMLHttpRequest();
} else {
// code for IE6, IE5
xhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xhttp.onreadystatechange = function() {
if (xhttp.readyState == 4 && xhttp.status == 200) { document.getElementById("demo").innerHTML = xhttp.responseText;
}
};
xhttp.open("get", "https://localhost:{generated port number from above}/Default.aspx", false);
// xhttp.open("get", "/Default.aspx", false);
xhttp.send();
}
catch (ex)
{
alert(ex.message)
}
}
</script>
</body>
</html>
Because of security the above code may not work at your computer, that is ok.
Compile and run the above code, if you are using the development web server, note the generated port number.
Now let us call the service from the client, here is the client code
Compress the solution with all the files and submit it as Ajax004.zip.
Lab 5: Create a new MVC project with the following
You are going to use Razor
1) Create a page that will have a simple calculator that does the four main operations (add, subtract, divide, multiply)
2) Create 3 text boxes (first number, second number, result) 4 buttons one for each operation.
Add additional button to clear the results
3) Prevent dividing by zero
Compress the solution with all the files and submit it as MVC project005.zip.
Lab 6: Create a new WEB API project with the following
The front end is JavaScript/JQuery
1) Create a page that will have a simple calculator that does the four main operations (add, subtract, divide, multiply)
2) Create 3 text boxes (first number, second number, result) 4 buttons one for each operation.
Add additional button to clear the results
3) Prevent dividing by zero
4) Create web services for the calculations
5) Compare MVC and WEB API developments.
Compress the solution with all the files and submit it as JavaScript_JQuery006.zip.
Attachment:- Enterprise Development Using ASP.NET.rar