use both C# and VB in ASP development

Ask a Question related to ASP Components, Design and Development.

  1. #1

    Default use both C# and VB in ASP development

    I followed a Microsoft Webcast and constructed a Website. I have VB code in
    the App_Code folder. Everything works. I learned that every time I change the
    VB code in App_Code folder, it will be automatically re-compiled. Then I used
    C# to write a public class and also put in the App_Code folder. I failed to
    build with an error saying that I can not put 2 different language in the
    same App_Code folder. So I created another folder called App_Code_c and had
    my C# code put in there. When I build, I see the message saying my C# code is
    complied, and without an error, but in my ASP code, I can not refer to the
    class that is defined in my C# code. I can make my C# code work if I kick out
    all the VB code in App_Code folder & only put C# code in App_Code.

    How can I write some classes in C# and make them accessible in ASP which is
    primarily composed with VB ?

    Thanks.
    dotNetFan Guest

  2. Similar Questions and Discussions

    1. Web development
      Please email us or visit our site to talk to a designer. Im the President and Proud owner of SystemTech Computers and I would like to help you out....
    2. Contribute ASP.NET development
      Hi everyone. I am currently building an ASP.NET (ver 1.1) website which will allow users to publish content to the site. I've been told by an ASP...
    3. DW and ASP.NET Development
      I'm a ColdFusion developer and I started learning ASP.NET a couple months ago. I have been using Dreamweaver for over 5 years and love to design...
    4. Development best practices and knowing when to exercise control over development
      Hi Nuno, After analyzing your message, I found that most of it was purely theoretical. The actual issue you discussed was regarding how to...
    5. what to use for development
      Lon Stowell wrote: That reminds me of when I used Pascal on the HP 64000 cross-compiling to run under iRMX on Intel 8086 (-:. GNU Pascal...
  3. #2

    Default RE: use both C# and VB in ASP development

    Hello,

    I think you may create two different project in one solution, for example,
    a VB.NET ASP.NET project as the main project, and C# class library project
    with your customized C# class. In the VB ASP.NET project, you can add a
    reference to the C# project so that you can use the classes defined in the
    C# project.

    BTW, for ASP.NET issues, we usually post in following group:

    microsoft.public.dotnet.framework.aspnet

    Sincerely,

    Luke Zhang

    Microsoft Online Community Support
    ==================================================
    Get notification to my posts through email? Please refer to
    [url]http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif[/url]
    ications.

    Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
    where an initial response from the community or a Microsoft Support
    Engineer within 1 business day is acceptable. Please note that each follow
    up response may take approximately 2 business days as the support
    professional working with you may need further investigation to reach the
    most efficient resolution. The offering is not appropriate for situations
    that require urgent, real-time or phone-based interactions or complex
    project analysis and dump analysis issues. Issues of this nature are best
    handled working with a dedicated Microsoft Support Engineer by contacting
    Microsoft Customer Support Services (CSS) at
    [url]http://msdn.microsoft.com/subscriptions/support/default.aspx[/url].
    ==================================================

    This posting is provided "AS IS" with no warranties, and confers no rights.



    Luke Zhang [MSFT] Guest

  4. #3

    Default Re: use both C# and VB in ASP development

    [url]http://www.aspkey.net/aspkey/_blog/index.asp?giorno=2&month=2&year=2007[/url]





    "dotNetFan" <nickAlias@nospam.nospam> wrote in message news:BD8C026B-DED8-4167-9618-6DDEF0B43DEF@microsoft.com...
    >I followed a Microsoft Webcast and constructed a Website. I have VB code in
    > the App_Code folder. Everything works. I learned that every time I change the
    > VB code in App_Code folder, it will be automatically re-compiled. Then I used
    > C# to write a public class and also put in the App_Code folder. I failed to
    > build with an error saying that I can not put 2 different language in the
    > same App_Code folder. So I created another folder called App_Code_c and had
    > my C# code put in there. When I build, I see the message saying my C# code is
    > complied, and without an error, but in my ASP code, I can not refer to the
    > class that is defined in my C# code. I can make my C# code work if I kick out
    > all the VB code in App_Code folder & only put C# code in App_Code.
    >
    > How can I write some classes in C# and make them accessible in ASP which is
    > primarily composed with VB ?
    >
    > Thanks.

    Jon Paal [MSMD] Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139