1. Home
  2. Computing & Technology
  3. Visual Basic

ASP.NET - Learn Programming for the Networked World - Part 4

By , About.com Guide

8 of 8

Completing the Calculator Web User Control

~~~~~~~~~~~~~~~~~~~~~~~~~
If Session("PendingOp") Is Nothing _
   Then Session("PendingOp") = "Null"
If Session("PendingOpFlag") Is Nothing _
   Then Session("PendingOpFlag") = False
If Session("Accum") Is Nothing _
   Then Session("Accum") = 0
~~~~~~~~~~~~~~~~~~~~~~~~~

The same "PendingOp" line of code we saw earlier would actually be coded this way

Session("PendingOp") = tag

Again, use the Find function in Visual Studio to check the use of the three variables in question and recode them as session variables instead. (Don't use "Replace All" ... you'll change more than you want to change.)

NOW run your app again. Does it work? This time it SHOULD work correctly! But if you're still having trouble, you the full source code can be found HERE.

There are a lot of critical ideas in this simple example and if you understand the whole thing, you've got the very heart of ASP.NET.

Congratulations!

Explore Visual Basic
By Category
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Visual Basic
  4. Learn VB.NET
  5. Learn ASP.NET
  6. ASP.NET - Learn Programming for the Networked World - Part 4

©2009 About.com, a part of The New York Times Company.

All rights reserved.