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. General Programming
  3. C#
  4. VB.Net- C# integration

VB.Net- C# integration

Scheduled Pinned Locked Moved C#
csharpasp-nettoolsquestion
3 Posts 3 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.
  • M Offline
    M Offline
    Madhuri Mittal
    wrote on last edited by
    #1

    I have a ASP.net application written in VB.Net which is the main application. I have another ASP.net application written in C#. I want to integrate the C# project files into the VB.net project ( without having to convert C# code to VB.net ) . The C# project contains few aspx pages and couple of C# utility classes. What would be the best way to integrate the C# files into VB.net project and run these successfully within the VB.net app? Thanks Madhuri Mittal

    S 1 Reply Last reply
    0
    • M Madhuri Mittal

      I have a ASP.net application written in VB.Net which is the main application. I have another ASP.net application written in C#. I want to integrate the C# project files into the VB.net project ( without having to convert C# code to VB.net ) . The C# project contains few aspx pages and couple of C# utility classes. What would be the best way to integrate the C# files into VB.net project and run these successfully within the VB.net app? Thanks Madhuri Mittal

      S Offline
      S Offline
      SimonS
      wrote on last edited by
      #2

      The short answer is that you can't have C# files in a VB.NET project. I'd recommend either writing your C# into VB.NET for inclusion in the VB.NET proj, or componentise the C# code into a .dll that you can reference from the VB.NET proj. You could also expose the C# code as a webservice. It all depends on what the aspx C# files do. Cheers, Simon sig ::
      "Don't try to be like Jackie. There is only one Jackie.... Study computers instead.", Jackie Chan on career choices.
      article :: animation mechanics in SVG     picture :: my first abstract photo

      I 1 Reply Last reply
      0
      • S SimonS

        The short answer is that you can't have C# files in a VB.NET project. I'd recommend either writing your C# into VB.NET for inclusion in the VB.NET proj, or componentise the C# code into a .dll that you can reference from the VB.NET proj. You could also expose the C# code as a webservice. It all depends on what the aspx C# files do. Cheers, Simon sig ::
        "Don't try to be like Jackie. There is only one Jackie.... Study computers instead.", Jackie Chan on career choices.
        article :: animation mechanics in SVG     picture :: my first abstract photo

        I Offline
        I Offline
        Ista
        wrote on last edited by
        #3

        SimonS wrote: The short answer is that you can't have C# files in a VB.NET project uhh, no. Actually you misread his question. No you can't have vb files in a windows or console application but YES you can inside a web application You just redirect the file pointer at the top of the aspx page, You can have many different files including java files in there. Although .net transforms it into J# and is utterly useless with J2EE at that point. Just go to add existing item and add the code behind. Then at the top of your asp page change the finlename it points to and thats all there is to it. nick I'm not an expert yet, but I play one at work. Yeah and here too.

        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