I am trying to convert the following visual basic code which is from a windows forms application into c# code in web forms:
The first block of code is the vis