This week we received the completed prototype store and we went through its processes. I also created the mock-up of my assignment website using html. My website is an online pets store selling pet accessories. I used CSS to style the entire web page. I am happy with the result and am now going to convert it to aspx in Visual Studio.
Thursday, March 25, 2010
Thursday, March 18, 2010
Week 6
This week we looked at hosting websites and the different features and packages that are available. We then created a short program that looked at inheritance and polymorphism. The program calculated the cost of a trip depending on what type of vehicle was selected.
Tuesday, March 16, 2010
Web Application Hosting
Minimum requirements for hosting semester 1 assignment:
- Shared Windows Server
- 3gb Web space
- 10gb Bandwidth
- Shared SSL Certificate
- Online FTP
- Located in Australia
- 10 email accounts each 100mb
- Phone and email support
- MS SQL 2005
- .NET Framework 3.5
- 6 month initial contract
Possible companies:
- Corporate Plan on Hosting Bay
- Business Plan on Netregistry
- Business Plan on Webcentral
- MyWebHost on Crazydomains with Microsoft Upgrade
Wednesday, March 10, 2010
Week 5
This week we continued our prototype store. We looked at how to create relationships between tables in our database, and also looked at the query builder in visual studio. We had to program the website to allow the user to select a product from the list of products that matched their already selected category. Once they select the product the productID is passed as a query string which then allows the detailed description of their selected product to be displayed. After that we had to create a master page and remake all the pages again to use that master page. The master page contained the main layout and visual effects that are on all the pages and the category list and the code to get the categories from the database.
Wednesday, March 3, 2010
Week 4
This week we looked at cookies and how they are used. Cookies are used to store variables in the users web browser, such as users login are shopping cart items etc. To create a cookie:
Response.Cookies("CookieName")("VarriableName") = Variable.
To retrieve data from the cookie:
Request.Cookies("CookieName")("VarriableName").
We then created a Global.asax page and explored what it does. To create it you use the add new item in visual studio and select Global.asax. The Global.asax page allows you to have parts of code that run only at specific points within the life of the website, such as when its initially created or when a session ends etc. We then talked more about arraylists and their properties and methods. We created a test array that utilized its properties and methods and a webpage to run it through. We then continued on with our prototype store. We created another class to get the products that match a category when one is selected. The results were shown in a grid view on the products page.
Response.Cookies("CookieName")("VarriableName") = Variable.
To retrieve data from the cookie:
Request.Cookies("CookieName")("VarriableName").
We then created a Global.asax page and explored what it does. To create it you use the add new item in visual studio and select Global.asax. The Global.asax page allows you to have parts of code that run only at specific points within the life of the website, such as when its initially created or when a session ends etc. We then talked more about arraylists and their properties and methods. We created a test array that utilized its properties and methods and a webpage to run it through. We then continued on with our prototype store. We created another class to get the products that match a category when one is selected. The results were shown in a grid view on the products page.
Wednesday, February 24, 2010
Week 3
This week we looked at websites where you can buy things. Everyone picked one website and then gave a presentation about the process of buying something from that site and also any useful features that they have. I chose ebay and looked at their process. I like the simplicity of their sign up form and their organization of all the items available.When you search for something you can refine the search down and get very specific about what you're looking for. When purchasing a product they have a number of confirmation pages to stop people from accidentally buying something. Their design is also simple with lots of breathing space.
After our presentations we continued with the website from last week. We added hyperlinks to the categories within the grid view to allow a category to be chosen. We then added a second table to our database to contain a list of products available for sale. A new class was also created to manage the products.
Tuesday, February 23, 2010
Online Store
Wednesday, February 17, 2010
Week 2
This week we began looking at SQL Server and reviewed database operations. We were also guided through the beginnings of creating a website that uses a SQL database. We had to create a simple design for a 3 div layout, header, categories and main content. Once the base structure of a page was coded it was duplicated for a number of pages. We then created a SQL database in Visual Studio. This was a simple a database with a single table containing all the categories available. This was then added into the web page in a grid view pulled from the toolbox.
Wednesday, February 10, 2010
Week 1
This week we began our Diploma course. We started a refresher of last years programming code. We covered the basics and refreshed class diagrams and how to code and call a class. We also began looking at response requests, query strings and sessions. These both allow data to be passed from one web page to another within the site.
Tuesday, February 9, 2010
Sessions
Sessions allow variables to be created in a webpage and to be accessed by another webpage within an application. However they only last for a matter of minutes.
To create a session you use the code: Session("Name") = "Value"To access a session you use the code: lblSession.text = Session("Name")
If Session.Item("Name") IsNot Nothing Then
Response.Write(Session("Name"))
Else
Response.Write("Session Name does not exist")
End If
To make sure an session does exist and to avoid errors you can use an if statement.
For example:If Session.Item("Name") IsNot Nothing Then
Response.Write(Session("Name"))
Else
Response.Write("Session Name does not exist")
End If
Querystrings
Querystrings can be used to send information from one webpage to another.
The code to send the data is:
The code to send the data is:
Response.Redirect("confirm.aspx?FirstName=" & txtFirstName.Text)
confirm.aspx is the page url; the ? denotes the start of the query; FirstName is the field name and the txtFirstName is where the fields data is stored.
Any subsequent field names begin with an &.The code to receive the data is: Request.QueryString("FirstName") which simply uses the field name to identify what data you are asking for.
Subscribe to:
Posts (Atom)







