Introduction to server side programming
Michał Okulewicz, MSc Warsaw University of Technology
Faculty of Mathematics and Information Science M.Okulewicz@mini.pw.edu.pl
http://www.mini.pw.edu.pl/~okulewiczm
Server side programming tasks
• We will be using Microsoft .NET WebForms as an example of server side scripting
• In all the tasks please use Visual Studio 2012, 2013 or 2015
• DISCLAIMER: This is NOT a tutorial in WebForms progamming
• HINT: Please use enclosed HTML and CSS
Web project [VS 2012 example]
• Create a new Empty web project
• Add the contents you need – HTML pages
– CSS styles – JS scripts
– WebForms (ASPX)
Task 1, part 1
• Create an HTML page with a registration form:
– A text input
– Two password inputs – A file input
– REMINDER: set the name attributes of the inputs
• Copy the HTML form 3 times, setting the method and enctype attributes to the following:
– get; application/x-www-form-urlencoded – post; application/x-www-form-urlencoded
Task 1, part 2
• Create a Register.aspx WebForm for checking the identity of the passwords (point the action of the forms to the Register.aspx)
• Display HTTP environment variables – CONTENT_TYPE
– REQUEST_METHOD – QUERY_STRING – CONTENT_LENGTH
• Display contents of the input stream from the Request object
• Observe the differences between different methods and encodings
Task 2
• Create a GeoConverter.aspx WebForm for converting the geographical coordinates between the decimal and degrees minutes seconds format
• The user enters and submits the coordinates for longitude and latitude in any of those formats (eg. 51 23' 21” N or 51.389167) which results in displaying longitude and latitude in both formats
• The GeoConverter WebForm should be immune to the incorrect format of the parameters displaying an info message Format not recognized
Task 3
• Create a WebForm generating a PNG image
• An image might be a circle, a rectangle or a custom text, depending on the parameters provided to the WebForm