Results 1 to 2 of 2

Thread: some code to vb.net

  1. #1

    Thread Starter
    Hyperactive Member Arrow_Raider's Avatar
    Join Date
    Dec 2001
    Location
    AVR Lovers Club
    Posts
    423

    some code to vb.net

    I have this snipet of code i pulled off the forum on brinkster

    Code:
    <script language="C#" runat="server">
    protected override object LoadPageStateFromPersistenceMedium() {
       object o = null;
       try{
          o = base.LoadPageStateFromPersistenceMedium();
       } catch {}
       return o;
    }
    </script>
    Its evidently supposed to ignore viewstate errors, which i get a lot on brinkster cause something is wrong with their servers and they are too lazy to fix the problem. My site is in vb.net, so like could someone convert that code into vb.net
    My monkey wearing the fedora points and laughs at you.

  2. #2
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Did it by hand, and didn't verify it. I don't remember what the override is in VB, but you can look that up.
    Code:
    protected override function LoadPageStateFromPersistenceMedium() As Object
          Dim o As Object
          Try
               o = mybase.LoadPageStateFromPersistenceMedium()
          Catch(ex As Exception)
    
          End Try
    
           LoadPageStateFromPersistenceMedium = o
    End Function
    Look at the code I translated, then look at the code you posted. It is pretty simple to do these little conversions. You should try to understand the syntax of the C# language so you can do these without problems.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width