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. Reg: language

Reg: language

Scheduled Pinned Locked Moved ASP.NET
csharpquestion
7 Posts 6 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.
  • S Offline
    S Offline
    sowjanya3
    wrote on last edited by
    #1

    Can we use both C# and VB language in same aspx page?

    G T B F 4 Replies Last reply
    0
    • S sowjanya3

      Can we use both C# and VB language in same aspx page?

      G Offline
      G Offline
      Gaurav Dudeja India
      wrote on last edited by
      #2

      no you cant use them in same page.

      Gaurav Dudeja http://www.gdinfotechindia.com
      Dont be afraid of changing your life to better !

      1 Reply Last reply
      0
      • S sowjanya3

        Can we use both C# and VB language in same aspx page?

        T Offline
        T Offline
        The Man from U N C L E
        wrote on last edited by
        #3

        You can only use one language per page, as the code-beside is compiled (either at run time or compile time) and you an only compile one language into a single assembly. However, you can have multiple pages that have different code-beside languages. If you are using the web application project model, this will not work as only one assembly is produced. Instead you must use the web site model, and specify the codeSubDirectories setting in the config file. Although, why mix c# and vb.net? It is all .Net anyway. Just pick one and stick to it. Translating code from one to the other is simple enough. If you can't do the translation yourself there are hundreds of tools and websites that can do it for you.

        If you have knowledge, let others light their candles at it. Margaret Fuller (1810 - 1850) [My Articles]  [My Website]

        J 1 Reply Last reply
        0
        • S sowjanya3

          Can we use both C# and VB language in same aspx page?

          B Offline
          B Offline
          Brij
          wrote on last edited by
          #4

          I dont think so, but yes you can use in the same project.. for that you can have different classes both C# or in VB.put it in appcode folder, make entry in web.config and now you can these classes throughout in your application. for delatills have a look in the following link Click here

          Cheers!! Brij Check my latest Article :Exploring ASP.NET Validators

          1 Reply Last reply
          0
          • T The Man from U N C L E

            You can only use one language per page, as the code-beside is compiled (either at run time or compile time) and you an only compile one language into a single assembly. However, you can have multiple pages that have different code-beside languages. If you are using the web application project model, this will not work as only one assembly is produced. Instead you must use the web site model, and specify the codeSubDirectories setting in the config file. Although, why mix c# and vb.net? It is all .Net anyway. Just pick one and stick to it. Translating code from one to the other is simple enough. If you can't do the translation yourself there are hundreds of tools and websites that can do it for you.

            If you have knowledge, let others light their candles at it. Margaret Fuller (1810 - 1850) [My Articles]  [My Website]

            J Offline
            J Offline
            J4amieC
            wrote on last edited by
            #5

            The Man from U.N.C.L.E. wrote:

            there are hundreds of tools and websites that can do it for you.

            All of which do an awful job.

            T 1 Reply Last reply
            0
            • J J4amieC

              The Man from U.N.C.L.E. wrote:

              there are hundreds of tools and websites that can do it for you.

              All of which do an awful job.

              T Offline
              T Offline
              The Man from U N C L E
              wrote on last edited by
              #6

              Not at all, although I agree there are some terrible web sites out there. I use SharpDevelop and most of the time it translates correctly. I have to say I don't translate code that much as I just write in whatever language is appropriate, but SharpDevelop definately does the job, and does it well. Another solution would be to compile the code and use .Net Reflector to read it from the assembly. That outputs to C# or VB, along with other languages, and translates perfectly.

              If you have knowledge, let others light their candles at it. Margaret Fuller (1810 - 1850) [My Articles]  [My Website]

              1 Reply Last reply
              0
              • S sowjanya3

                Can we use both C# and VB language in same aspx page?

                F Offline
                F Offline
                farogh haider
                wrote on last edited by
                #7

                Yes, you can use both language by using different master page

                Farogh Haider Web developer

                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