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. instance problem

instance problem

Scheduled Pinned Locked Moved ASP.NET
helptutorial
7 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.
  • K Offline
    K Offline
    Kissy16
    wrote on last edited by
    #1

    how to create instance of a class which is inside a app_code folder's folder. means my file is like below App_code -myfolder class2.vb Inside folder which is placed inside app_code folder. i want to create class2 instance in my vb file. if it is inside app_code,normalo decalration is dim ptr as class2=new class2 but class2 is inside myfolder. please give me some idea

    kissy

    M 1 Reply Last reply
    0
    • K Kissy16

      how to create instance of a class which is inside a app_code folder's folder. means my file is like below App_code -myfolder class2.vb Inside folder which is placed inside app_code folder. i want to create class2 instance in my vb file. if it is inside app_code,normalo decalration is dim ptr as class2=new class2 but class2 is inside myfolder. please give me some idea

      kissy

      M Offline
      M Offline
      Manas Bhardwaj
      wrote on last edited by
      #2

      Kissy16 wrote:

      how to create instance of a class which is inside a app_code folder's folder

      It doesn't matter where your class file reside. The only important aspects are the class name(usually when it is in a Folder, Visual Studio puts the name as FolderName_ClassName), the access modifier.

      Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.

      K 1 Reply Last reply
      0
      • M Manas Bhardwaj

        Kissy16 wrote:

        how to create instance of a class which is inside a app_code folder's folder

        It doesn't matter where your class file reside. The only important aspects are the class name(usually when it is in a Folder, Visual Studio puts the name as FolderName_ClassName), the access modifier.

        Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.

        K Offline
        K Offline
        Kissy16
        wrote on last edited by
        #3

        thanks for ur response. actually am using c# and vb files in my vb.net project. for c# files am using another folder and placed the c# files inside it. and added the subdirectories tag in web.config. as my project is vb how can i access the c# class inside my .vb file? please five me some example

        kissy

        C A 2 Replies Last reply
        0
        • K Kissy16

          thanks for ur response. actually am using c# and vb files in my vb.net project. for c# files am using another folder and placed the c# files inside it. and added the subdirectories tag in web.config. as my project is vb how can i access the c# class inside my .vb file? please five me some example

          kissy

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          What is the problem ? It doesn't matter. I don't believe you can use VB and C# files in your project, you can only mix them up for the pages. But, if it compiles, then I am wrong. Either way, the classes in the project, are visible to all languages in the project. Did you actually try anything before asking this ? Is so, and it doesn't work, post the code and the error so we can try to work out what you're doing wrong.

          Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp

          K 1 Reply Last reply
          0
          • K Kissy16

            thanks for ur response. actually am using c# and vb files in my vb.net project. for c# files am using another folder and placed the c# files inside it. and added the subdirectories tag in web.config. as my project is vb how can i access the c# class inside my .vb file? please five me some example

            kissy

            A Offline
            A Offline
            Abhijit Jana
            wrote on last edited by
            #5

            Does it compile properly after putting the C# and VB Class in different folder? Did you set the web.config Subdirectory Section like <Compilation> <codeSubDirectory> .... <add directoryName="CSharpFolderName"/> ..... </codeSubDirectories> </compilation> Then try to access the call method using object that class. Also check the class access modifier.

            cheers, Abhijit CodeProject MVP Web Site:abhijitjana.net View My Recent Article

            K 1 Reply Last reply
            0
            • C Christian Graus

              What is the problem ? It doesn't matter. I don't believe you can use VB and C# files in your project, you can only mix them up for the pages. But, if it compiles, then I am wrong. Either way, the classes in the project, are visible to all languages in the project. Did you actually try anything before asking this ? Is so, and it doesn't work, post the code and the error so we can try to work out what you're doing wrong.

              Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp

              K Offline
              K Offline
              Kissy16
              wrote on last edited by
              #6

              am trying to use .cs class file in my vb.net project. I read that in vs2005 ,it compiles the multiple languages. and now in my app_code folder i have added some of my .vb classes and for c# classes i have added folder and inside i placed my c# files. i have added the following tag in my web.config When am just compiling it is giving error ,identifier expected in the below line <%@ Page Language="VB" AutoEventWireup="false" codeFile="Default3.aspx.vb" Inherits="Default3" %> and i wanted to create instance of that .cs class and want to use in my .vb.aspx file. Can it be possible,ya am i interpreting wrongly? please send me what i have to do in this case? please if u have time......

              kissy

              1 Reply Last reply
              0
              • A Abhijit Jana

                Does it compile properly after putting the C# and VB Class in different folder? Did you set the web.config Subdirectory Section like <Compilation> <codeSubDirectory> .... <add directoryName="CSharpFolderName"/> ..... </codeSubDirectories> </compilation> Then try to access the call method using object that class. Also check the class access modifier.

                cheers, Abhijit CodeProject MVP Web Site:abhijitjana.net View My Recent Article

                K Offline
                K Offline
                Kissy16
                wrote on last edited by
                #7

                while building itseldf it is showing the error like "identifier expected" in the following line.. <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default3.aspx.vb" Inherits="Default3" %> ya i have added the same in my web.config file. there is no intellisence coming with my .cs class file.

                kissy

                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