File Directory ASP.Net

<%@ Page Language="VB" %>
<%@ import Namespace="System.IO" %>

    Dim objBinaryWriter As BinaryWriter
    Dim objBinaryReader As BinaryReader
    
    Sub WriteButton_Click(sender As Object, e As EventArgs)
        Dim objFileStream As FileStream
        Try
               objFileStream = New FileStream("myFileVB.bin", FileMode.Create)
               objBinaryWriter = New BinaryWriter(objFileStream)
    
               Dim Name As String = NameTextBox.Text
               Dim Age As Integer = Int32.Parse(AgeTextBox.Text)
               Dim Sex As Char = Char.Parse(SexTextBox.Text)
    
               objBinaryWriter.Write(Name)
               objBinaryWriter.Write(Age)
               objBinaryWriter.Write(Sex)
    
        Catch FileEx As FileNotFoundException
            MessageLabel.Text = FileEx.Message()
            Exit Sub
        Catch Ex As Exception
            MessageLabel.Text = Ex.Message()
            Exit Sub
        End Try
    
        WriteBinaryPanel.Visible = False
        ReadBinaryPanel.Visible = True
    
    End Sub
    
  Sub ReadButton_Click(Sender As Object, e As EventArgs)
    Dim objFileStream As FileStream
    Try
        objFileStream = New FileStream("C:\myFileVB.bin", FileMode.Open)
        objBinaryReader = New BinaryReader(objFileStream)
        NameLabel.Text = "Your Name: " & objBinaryReader.ReadString()
        AgeLabel.Text = "Your Age: " & objBinaryReader.ReadInt32()
        SexLabel.Text = "Your Sex: " & objBinaryReader.ReadChar()
    Catch FileEx As FileNotFoundException
      MessageLabel.Text = FileEx.Message()
      Exit Sub
    Catch Ex As Exception
      MessageLabel.Text = Ex.Message()
      Exit Sub
    End Try
  End Sub


  
  
  
    
      


        
          


            Please enter your Name:
            
          


          


            Please enter your Age:
            
          


          


            Please enter your Sex:
                                     runat="Server" 
                         MaxLength="1" 
                         Columns="1">
            (M/F)
          


          


                                    onclick="WriteButton_Click" 
                        runat="server" 
                        Text="Write It!">
          


        
        
          


                                    onclick="ReadButton_Click" 
                        runat="server" 
                        Text="Read It!">
          


          


            
          


          


            
          


          


            
          


        
      


      


                           runat="server" 
                   EnableViewState="False">