re:
!> i was just curious about this App_Code thing but as you can imagine,
!> I'm not impressed at all by that functionality..
Quite frankly, I'm not too impressed with it, either, primarily from a security viewpoint.
Uploading raw code to a server isn't a very secure approach to programming.
Also, there's no problems like the one you're encountering.
re:
!> I can only use my product-class when using it in inline script in the aspx-file,
!> so why come up then with the idea of code-behind in the first place?
I've evolved a personal preference which skirts the issues :
I compile assemblies with my helper classes ( my DAL layer ) from the command-line,
and place the resulting assembly in the /bin directory.
It's quite easy then to import my namespace with
<%@ Import Namespace="DataObjects" %>
....and instantiating the SQLDATA class is uncomplicated with :
Dim RS as New SQLDATA()
It works 100% of the time with no fuss.
I'd recommend ( depending on your time availability )
you dump what you're doing now...and create your own Data Access Layer (DAL).
Here's two pages with sample code which will help you get that done quickly :
http://msdn.microsoft.com/en-us/library/aa581778.aspx
http://weblogs.asp.net/scottgu/archi...15/435498.aspx
Juan T. Llibre, asp.net MVP
asp.net faq :
http://asp.net.do/faq/
foros de asp.net, en espaņol :
http://asp.net.do/foros/
======================================
<> wrote in message news:473ffac9-7aa3-4d08-a827-...
> On Aug 2, 1:22 pm, "Mark Rae [MVP]" <m...@markNOSPAMrae.net> wrote:
>> "Juan T. Llibre" <nomailrepl...@nowhere.com> wrote in messagenews:. ..
>>
>> > VS 2008 follows this type of class naming syntax in code-behind files:
>>
>> > In default.aspx.cs, the code-behind page for Default.aspx...
>> > public partial class _Default : System.Web.UI.Page
>>
>> > Notice the underscore, and notice that the page's class
>> > is named for the page name, with an underscore added.
>>
>> Also, the upper-case "D", C# being case-sensitive...
>>
>> > It looks to me like like renamed an aspx page, but did not change the
>> > class name in the code-behind.
>>
>> Indeed. I've been caught out with that on more than one occasion... 
>>
>> > The IDE does not automatically change the class name for you if you rename
>> > a file.
>> > If you ask me, I think it should... 
>>
>> I agree or, at the very least, pop a warning to say that there is now a
>> "mismatch" (for want of a better term) between the class name specified in
>> the page's @Page directive and the actual partial class specified in its
>> associated code-behind file...
>>
>> --
>> Mark Rae
>> ASP.NET MVPhttp://www.markrae.net
>
> no difference 
>
> There was no namespace so it wasn't necessary but I've defined the
> class in a namespace now
>
> namespace MyNs
> {
> public partial class WebForm1 : System.Web.UI.Page
> {
> }
> }
>
> Inherits="MyNs.WebForm1"
>
> but still nothing 
>
> anyway ... as the best design still is a separate controlLib for each
> tier-component I think I'll leave it at that. unless you have another
> option ?
>
> i was just curious about this App_Code thing but as you can imagine,
> I'm not impressed at all by that functionality..
> my experience with it? a waste of time.
> what is supposed the benefit of it?
> I can only use my product-class when using it in inline script in the
> aspx-file, so why come up then with the idea of code-behind in the
> first place?
>
> Chris