Oregon State University
Oregon State University Home Page
ASP tictactoe

Recall our Tic-Tac-Toe assignment of BA371.  Now, using the techniques you learned in our ASP.Net 2.0 lab and LAMP lab port the game to the Web using ASP.Net 2.0.

This exercise is at once both 'easy' and 'difficult.' The 'easy' part is that you can reuse much of the code you already wrote in BA371; after all, ASP's 'code-behind' facilities that we explored in the  ASP.Net 2.0 lab are meant to do just that. The hard part is that whereas in a Windows or command-line app, state is automatically maintained in the app's memory, on the Web we have to overcome HTTP's statelessness using the methods we practiced in the ASP.Net lab and and LAMP lab.

Recall that in our LAMP lab, we have already ported our Tic-Tac-Toe game to the Web and we already had to maintain state. Therefore, from that lab you should have developed a good idea on which state variables to maintain. However, whereas in our LAMP version of Tic-Tac-Toe we maintained all state variables ourselves by storing then in <input type="hidden"> fields in the form, in the ASP.Net version you must use the ViewState() and/or SessionState() techniques demonstrated in the ASP.Net lab.

Click here for a demo version.

Hints and tips: