newbie - help - where do u store custom classes when importing namespaces in ASP

Discussion in 'ASP .Net' started by ravi sankar, Aug 25, 2003.

  1. ravi sankar

    ravi sankar Guest

    Hi abdul,
    Copying the dll to the bin directory is more than enough.
    But, how are you trying to access the class? Can u also
    provide the error message u r getting?
    You can refer to
    http://www.4guysfromrolla.com/webtech/112101-1.2.shtml

    that will help u to reference a simple dll.

    thanks and regards,
    s.ravi sankar


    >-----Original Message-----
    >hi, if I had a simple namespace called hello and it was

    stored in the
    >file hello.cs how would make that accessible to my aspx

    files. I am
    >aware that I would have to use the import

    namespace="hello" but is
    >there anything else. Would I need to register the dll or

    place the dll
    >in a special folder. At the moment I am placing it in the

    wwwroot\bin
    >folder and it doesnt seem to recognise it.
    > THanks your hekp would be appreciated.
    >
    >Abz
    >.
    >
     
    ravi sankar, Aug 25, 2003
    #1
    1. Advertising

  2. ravi sankar

    ravi sankar Guest

    I assume u have done the following steps
    1. Create a class library project called "testclass" and
    have the name space also as "testclass". Have a class
    called 'Class1' in it & a method 'SayHello()'
    2. When u compile "testclass" project, u get testclass.dll
    3. Create another web project "testwebprj" and have a
    webform webform1.aspx
    4. From project properties add reference to testclass.dll
    (this will copy the dll to the web project dll directroy)
    5. in the code behind
    Dim x as testclass.Class1
    x.SayHello()

    the above steps should work.

    Please let me know if u doing somthing different anywhere.

    regards,
    s.ravi sankar


    >-----Original Message-----
    >Hi ravi, I tried the example in the link that you

    provided but I end
    >up with the same error message. Iv been storing the dll

    in bin and
    >still cant reference it. Is there any way I can test that

    its actually
    >working?
    >
    >Compiler Error Message: CS0246: The type or namespace

    name 'testclass'
    >could not be found (are you missing a using directive or

    an assembly
    >reference?)
    >
    >thanks
    >abz
    >
    >"ravi sankar" <> wrote in message

    news:<074201c36af1$c2c24500$>...
    >> Hi abdul,
    >> Copying the dll to the bin directory is more than

    enough.
    >> But, how are you trying to access the class? Can u also
    >> provide the error message u r getting?
    >> You can refer to
    >> http://www.4guysfromrolla.com/webtech/112101-1.2.shtml
    >>
    >> that will help u to reference a simple dll.
    >>
    >> thanks and regards,
    >> s.ravi sankar
    >>
    >>
    >> >-----Original Message-----
    >> >hi, if I had a simple namespace called hello and it

    was
    >> stored in the
    >> >file hello.cs how would make that accessible to my

    aspx
    >> files. I am
    >> >aware that I would have to use the import

    >> namespace="hello" but is
    >> >there anything else. Would I need to register the dll

    or
    >> place the dll
    >> >in a special folder. At the moment I am placing it in

    the
    >> wwwroot\bin
    >> >folder and it doesnt seem to recognise it.
    >> > THanks your hekp would be appreciated.
    >> >
    >> >Abz
    >> >.
    >> >

    >.
    >
     
    ravi sankar, Aug 26, 2003
    #2
    1. Advertising

  3. ravi sankar

    abdul bari Guest

    Hi, I havnt got Visual Studio so is it possbile to reference it using
    command line options?

    abz

    "ravi sankar" <> wrote in message news:<063101c36b81$ecf63ee0$>...
    > I assume u have done the following steps
    > 1. Create a class library project called "testclass" and
    > have the name space also as "testclass". Have a class
    > called 'Class1' in it & a method 'SayHello()'
    > 2. When u compile "testclass" project, u get testclass.dll
    > 3. Create another web project "testwebprj" and have a
    > webform webform1.aspx
    > 4. From project properties add reference to testclass.dll
    > (this will copy the dll to the web project dll directroy)
    > 5. in the code behind
    > Dim x as testclass.Class1
    > x.SayHello()
    >
    > the above steps should work.
    >
    > Please let me know if u doing somthing different anywhere.
    >
    > regards,
    > s.ravi sankar
    >
    >
    > >-----Original Message-----
    > >Hi ravi, I tried the example in the link that you

    > provided but I end
    > >up with the same error message. Iv been storing the dll

    > in bin and
    > >still cant reference it. Is there any way I can test that

    > its actually
    > >working?
    > >
    > >Compiler Error Message: CS0246: The type or namespace

    > name 'testclass'
    > >could not be found (are you missing a using directive or

    > an assembly
    > >reference?)
    > >
    > >thanks
    > >abz
    > >
    > >"ravi sankar" <> wrote in message

    > news:<074201c36af1$c2c24500$>...
    > >> Hi abdul,
    > >> Copying the dll to the bin directory is more than

    > enough.
    > >> But, how are you trying to access the class? Can u also
    > >> provide the error message u r getting?
    > >> You can refer to
    > >> http://www.4guysfromrolla.com/webtech/112101-1.2.shtml
    > >>
    > >> that will help u to reference a simple dll.
    > >>
    > >> thanks and regards,
    > >> s.ravi sankar
    > >>
    > >>
    > >> >-----Original Message-----
    > >> >hi, if I had a simple namespace called hello and it

    > was
    > stored in the
    > >> >file hello.cs how would make that accessible to my

    > aspx
    > files. I am
    > >> >aware that I would have to use the import

    > namespace="hello" but is
    > >> >there anything else. Would I need to register the dll

    > or
    > place the dll
    > >> >in a special folder. At the moment I am placing it in

    > the
    > wwwroot\bin
    > >> >folder and it doesnt seem to recognise it.
    > >> > THanks your hekp would be appreciated.
    > >> >
    > >> >Abz
    > >> >.
    > >> >

    > >.
    > >
     
    abdul bari, Aug 27, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. D. Shane Fowlkes
    Replies:
    1
    Views:
    947
    Tu-Thach
    Jan 13, 2004
  2. Rogue 9
    Replies:
    0
    Views:
    293
    Rogue 9
    Jul 4, 2003
  3. Harlin Seritt
    Replies:
    10
    Views:
    493
    Harlin Seritt
    Mar 5, 2005
  4. Donnal Walter
    Replies:
    1
    Views:
    291
    Peter Hansen
    Aug 22, 2005
  5. Ralph Wiggum

    Importing namespaces in a class

    Ralph Wiggum, Jan 23, 2008, in forum: ASP .Net
    Replies:
    7
    Views:
    387
    Ralph Wiggum
    Jan 23, 2008
Loading...

Share This Page