Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 2
    Off topic but may I ask why you are learning a framework currently considered by many as LTS? Is this required for school? If you have no good reason to start here I would scrap this and learn something newer that will be of more use to you. If you want server side code try the latest .net framework with MVC. If you want client side code learn pure HTML and javascript. If you want a client side framework learn angular or react. Commented Jul 29, 2021 at 19:23
  • Yes, it is for school. Commented Jul 29, 2021 at 19:25
  • 1
    I don't do asp.net, so this is just a guess, but maybe try only setting the default value if it's null, something like: if (Session["balance"] == null) Session["balance"] = 1000;. Also, seems like this should be in the Page_Load event, not the btnSubmit_Click event, since it only has to happen once. Commented Jul 29, 2021 at 19:29
  • Thanks!, that + setting the session variable = balance at the end seemed to work. Commented Jul 29, 2021 at 19:41