Google 網路論壇不再支援新的 Usenet 貼文或訂閱項目,但過往內容仍可供查看。

type 'pageClass' is not defined

瀏覽次數:682 次
跳到第一則未讀訊息

Lew Burrus

未讀,
2006年5月26日 上午9:09:302006/5/26
收件者:
I am relatively new to advanced concepts in
OOP, though I am fairly comfortable working
in .Net. Have recently taken a 1.1 project
into VS2005, and came across a show-stopper
of an error. When I create a variable of
another page's class type, the class is no
longer available, as I get the error "Type
'userControl' is not defined".

In other words, I have a page
displayRecs.aspx, and a user control
subRecords.ascx. In the main page, I need to
dim a variable as type subRecords; it worked
fine in 1.1, but in 2.0, I get the error. I
assume the compilation model requires
separate assemblies for each page, so the
classes aren't available until runtime. But
it seems like this could be a real hindrance
for many developers, and I image a workaround
must exist. Anybody know of one? Is this a
bug to be fixed, or a permanent change in .Net?

Lew

Jose Rodriguez

未讀,
2006年5月26日 上午10:23:422006/5/26
收件者:
Lew, In order to reference a class type, it has to live inside the App_Code
directory or else with the new compilation model; but there is hope! MS just
released a new web application project that resembles what we had in 1.1
check this:

http://msdn.microsoft.com/vstudio/default.aspx?pull=/library/en-us/dnvs05/html/WAP.asp

HTH

Jose
"Lew Burrus" <ver...@virginia.edu> wrote in message
news:uif2hWMg...@TK2MSFTNGP02.phx.gbl...

0 則新訊息