Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > First time at using shared code in App_Code directory

Reply
Thread Tools

First time at using shared code in App_Code directory

 
 
bissatch@yahoo.co.uk
Guest
Posts: n/a
 
      02-15-2007
Hi,

I have been using the following tutorials:

http://quickstarts.asp.net/QuickStar...ages/code.aspx

It would appear that it is instructing me to simply to create an
App_Code folder and place the CustomClass.vb file there. I have done
so and using the exact same code from the tutorial but it tells me the
class is undefined:

http://biztuk.brinkster.net/CodeFolder_vb.aspx

Obviously Im a little too new to this but do I need to do something
where the app knows that classes are contained there? Thanks

Burnsy

 
Reply With Quote
 
 
 
 
Teemu Keiski
Guest
Posts: n/a
 
      02-15-2007
Is the class (or classes in this case) in a namespace? If it is, you'd need
to import than namespace on the using page.

And you haven't specified any other code sub directories?

--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net


<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ps.com...
> Hi,
>
> I have been using the following tutorials:
>
> http://quickstarts.asp.net/QuickStar...ages/code.aspx
>
> It would appear that it is instructing me to simply to create an
> App_Code folder and place the CustomClass.vb file there. I have done
> so and using the exact same code from the tutorial but it tells me the
> class is undefined:
>
> http://biztuk.brinkster.net/CodeFolder_vb.aspx
>
> Obviously Im a little too new to this but do I need to do something
> where the app knows that classes are contained there? Thanks
>
> Burnsy
>


 
Reply With Quote
 
 
 
 
bissatch@yahoo.co.uk
Guest
Posts: n/a
 
      02-16-2007
On Feb 16, 4:12 am, "Teemu Keiski" <(E-Mail Removed)> wrote:
> Is the class (or classes in this case) in a namespace? If it is, you'd need
> to import than namespace on the using page.


Sorry, I was under the impression that you had folders that the
application would recognise and there was no need to define it in
every page. Is this not the case?

Also, how do I know if it is in the namespace?

> And you haven't specified any other code sub directories?


Do I not only need to specify code sub-directories if I create other
ones besides App_Code? How do I specify these?

I only know what the tutorials have specified and maybe overlooked
some part. If there is anything that could be outlined that I should
check for please let me know.

Thanks

Burnsy

 
Reply With Quote
 
Teemu Keiski
Guest
Posts: n/a
 
      02-18-2007
Namespace would mean that your classes are wrapper in namespace statement
like

Namespace MyNS

Public Class myTemp

End Class

End Namespace

If you are only using App_Code, then you don't need to configure anything.
It would e needed if you'd create separate folders under App_Code (for
example one for classes written in C# and one for classes in VB.NET)


--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net





<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> On Feb 16, 4:12 am, "Teemu Keiski" <(E-Mail Removed)> wrote:
>> Is the class (or classes in this case) in a namespace? If it is, you'd
>> need
>> to import than namespace on the using page.

>
> Sorry, I was under the impression that you had folders that the
> application would recognise and there was no need to define it in
> every page. Is this not the case?
>
> Also, how do I know if it is in the namespace?
>
>> And you haven't specified any other code sub directories?

>
> Do I not only need to specify code sub-directories if I create other
> ones besides App_Code? How do I specify these?
>
> I only know what the tutorials have specified and maybe overlooked
> some part. If there is anything that could be outlined that I should
> check for please let me know.
>
> Thanks
>
> Burnsy
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
refer to a public shared class in app_code folder Web Search Store ASP .Net 5 08-23-2008 11:56 AM
refer to a public shared class in app_code folder Web Search Store ASP .Net Web Services 5 08-23-2008 11:56 AM
refer to a public shared class in app_code folder Web Search Store ASP .Net Web Controls 5 08-23-2008 11:56 AM
Directory structure App_Code, Bin when using partitioned website and SSL Frank Miverk ASP .Net 1 03-20-2007 08:40 AM
shared app_code folder Howard ASP .Net 3 06-06-2006 01:57 PM



Advertisments