Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - Referencing class methods when using JIT directives

 
Thread Tools Search this Thread
Old 01-19-2006, 05:37 PM   #1
Default Referencing class methods when using JIT directives


Greetings,

In my ASP.NET application, I have user controls that refer to each other's
static methods. It works fine using the standard DLL compilation.

I now have a requirement where I need to get rid of my DLL, and go
completely wth JIT compilation using the Src attribute in each user control's
@Control directive:

<%@ Control Language="c#" AutoEventWireup="false" Src="myCtl.ascx.cs"
Codebehind="myCtl.ascx.cs" Inherits="myNS.myCtl"
TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>

When I do this, though, I get the error:
The type or namespace name 'myCtl' does not exist in the class or namespace
'myNS'

The page only displays when I eliminate all references to the code behind
and only reference the ascx contents.

I thought that either @Import or @Referenct would do the trick, but no luck.
Any ideas on how to get this working?

Many thanks,

Eric

--
www.SimplicityIsGenius.com


=?Utf-8?B?RXJpYyBMZW1tb24=?=
  Reply With Quote
Old 01-19-2006, 08:21 PM   #2
=?Utf-8?B?RXJpYyBMZW1tb24=?=
 
Posts: n/a
Default RE: Referencing class methods when using JIT directives
As a follow-up, I was able to get this working without any code changes by
configuring IIS to handle my app using the .NET Framework 2.0 instead of 1.1.
Might this be a bug/oversight in 1.1?

Thanks,

Eric

--
www.SimplicityIsGenius.com


"Eric Lemmon" wrote:

> Greetings,
>
> In my ASP.NET application, I have user controls that refer to each other's
> static methods. It works fine using the standard DLL compilation.
>
> I now have a requirement where I need to get rid of my DLL, and go
> completely wth JIT compilation using the Src attribute in each user control's
> @Control directive:
>
> <%@ Control Language="c#" AutoEventWireup="false" Src="myCtl.ascx.cs"
> Codebehind="myCtl.ascx.cs" Inherits="myNS.myCtl"
> TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
>
> When I do this, though, I get the error:
> The type or namespace name 'myCtl' does not exist in the class or namespace
> 'myNS'
>
> The page only displays when I eliminate all references to the code behind
> and only reference the ascx contents.
>
> I thought that either @Import or @Referenct would do the trick, but no luck.
> Any ideas on how to get this working?
>
> Many thanks,
>
> Eric
>
> --
> www.SimplicityIsGenius.com



=?Utf-8?B?RXJpYyBMZW1tb24=?=
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Attachment referencing image part jissondennis Software 0 03-16-2009 06:10 AM
Eclipse how to add external class with different pkg name jan2321 General Help Related Topics 0 11-06-2008 10:04 AM
70-536, 3 questions blade MCTS 11 03-23-2008 03:47 PM
GZipStream Class and Compression abbamilkii MCTS 0 01-31-2007 07:57 PM
Storing class with session (ASP.Net) bqmassey Software 0 09-22-2006 05:37 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

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