Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. How to Access VB class from c# class which both Classes in App_code folder

How to Access VB class from c# class which both Classes in App_code folder

Scheduled Pinned Locked Moved ASP.NET
csharpbusinesstutorialquestion
8 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 2821142
    wrote on last edited by
    #1

    Hi Experts, I am working on mixed language web project. In App_Code folder, Created 2 folders with names "VBCode", "CSCode". I added one class in VBCode folder with name "Class1.vb" and implemented 2 methods. And, I added one Class in CSCode folder with the name "Class2.cs". My Requirements is, I want to create object for class "Class1.vb" in my "Class2.cs". Is this Possible? if so, please give me the solution.

    A D J 3 Replies Last reply
    0
    • U User 2821142

      Hi Experts, I am working on mixed language web project. In App_Code folder, Created 2 folders with names "VBCode", "CSCode". I added one class in VBCode folder with name "Class1.vb" and implemented 2 methods. And, I added one Class in CSCode folder with the name "Class2.cs". My Requirements is, I want to create object for class "Class1.vb" in my "Class2.cs". Is this Possible? if so, please give me the solution.

      A Offline
      A Offline
      AmitGajjar
      wrote on last edited by
      #2

      HI, 1) you need to create one class library project for VB. 2) add your VBClass in that project. 3) build VB project and add DLL file into CSProject. 4) Add reference in your CSClass. 5) use VB functions :) Thanks -Amit.

      U 1 Reply Last reply
      0
      • A AmitGajjar

        HI, 1) you need to create one class library project for VB. 2) add your VBClass in that project. 3) build VB project and add DLL file into CSProject. 4) Add reference in your CSClass. 5) use VB functions :) Thanks -Amit.

        U Offline
        U Offline
        User 2821142
        wrote on last edited by
        #3

        Thanks for your reply. Other than this, is any other options?

        A 1 Reply Last reply
        0
        • U User 2821142

          Thanks for your reply. Other than this, is any other options?

          A Offline
          A Offline
          AmitGajjar
          wrote on last edited by
          #4

          No,as per my knowledge actually in single project you can not have multiple languages supported for now. do you have any problem creating different project ? thanks -amit

          U 1 Reply Last reply
          0
          • A AmitGajjar

            No,as per my knowledge actually in single project you can not have multiple languages supported for now. do you have any problem creating different project ? thanks -amit

            U Offline
            U Offline
            User 2821142
            wrote on last edited by
            #5

            No problem.. but, checking for any other alternative for this problem.

            A 1 Reply Last reply
            0
            • U User 2821142

              No problem.. but, checking for any other alternative for this problem.

              A Offline
              A Offline
              AmitGajjar
              wrote on last edited by
              #6

              if you like my solution please give rating thanks -amit.

              1 Reply Last reply
              0
              • U User 2821142

                Hi Experts, I am working on mixed language web project. In App_Code folder, Created 2 folders with names "VBCode", "CSCode". I added one class in VBCode folder with name "Class1.vb" and implemented 2 methods. And, I added one Class in CSCode folder with the name "Class2.cs". My Requirements is, I want to create object for class "Class1.vb" in my "Class2.cs". Is this Possible? if so, please give me the solution.

                D Offline
                D Offline
                David Asp
                wrote on last edited by
                #7

                This might help.(Never tried)He say's yes[^]

                ????

                1 Reply Last reply
                0
                • U User 2821142

                  Hi Experts, I am working on mixed language web project. In App_Code folder, Created 2 folders with names "VBCode", "CSCode". I added one class in VBCode folder with name "Class1.vb" and implemented 2 methods. And, I added one Class in CSCode folder with the name "Class2.cs". My Requirements is, I want to create object for class "Class1.vb" in my "Class2.cs". Is this Possible? if so, please give me the solution.

                  J Offline
                  J Offline
                  jkirkerx
                  wrote on last edited by
                  #8

                  I tried that years ago and it didn't work. Can't mix vb and csharp together in the same project. When you publish or run the project, the app_code folder gets compiled into a single or multiple dll's, not sure which but they don't mix. It's kind of like having webforms with a mixture of cs and vb code behind pages. You need to rewrite one of them if you want to keep them in the App_Code.

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups