|
| |
| cjwilliams | Asp.Net User |
| Re: Problems with Application Code and Controls | 4/15/2005 4:12:49 PM |
0 | |
|
Does anyone have an answer to the above question? I am running into the same thing, using Beta 2 and its a major roadblock for us.
Thanks in advance.
|
| Fredrik N | Asp.Net User |
| Re: Problems with Application Code and Controls | 4/15/2005 5:25:38 PM |
0 | |
|
Non-page related files will be moved to the App_Code dir, which includes the .cs or .vb files. The new dynamically compilation model will compile code into different assemblies, so because of this you need to add the Reference directive to the page that will point to the virtual path where the User control is located before you can for example cast your user control to its right type.
/Fredrik Norm?n NSQUARED2 Microsoft MVP, MCSD, MCAD, MCT CornerstoneMy Blog, ASP.Net 2.0 etc |
| cjwilliams | Asp.Net User |
| Re: Problems with Application Code and Controls | 4/15/2005 7:56:07 PM |
0 | |
|
Thanks Fredrik,
Sorry about the clarity of my post, the problem I am having is that the classes in the App_Code folder cannot find a reference to classes used for Pages and UserControls.
So class "A" is in the App_Code folder and is trying to instantiate a WebUserControl "AControl"
AControl a = new AControl();
The compiler returns The type or namespace name 'AControl' cannot be found .....etc
Is there someway this class can reference Page and UserControls?
Thanks for you help. |
| kashif | Asp.Net User |
| Re: Problems with Application Code and Controls | 4/17/2005 9:04:25 AM |
0 | |
|
Williams,
The issue you are seeing is due to the fact that app_code is compiled separately [and before pages/uc are compiled in the app] and has no references to pages/controls existing outside this directory. One possible workaround can be that you declare a base UserControl class in app_code - use this to do the instantiation and make your usercontrols derive from this UC class.
Thanks, Kashif |
| Baiju | Asp.Net User |
| Re: Problems with Application Code and Controls | 4/29/2005 8:14:44 PM |
0 | |
|
Yes. this is a work around.
Additionally, if you keep same name for new class in App_Code, and give a new name to Code behind class say, class MyUserControl_Imp : MyUserControl you just need to change the name only at the current page (change Inherits="MyUserControl_Imp") and the code behind file. You donot have to change other places where it is referenced.
You donot take this approach for all CB classes, only the classes referred from App_Code or any other Code Beside file. How about getting it done automatically?
Baiju
"This posting is provided "AS IS" with no warranties, and confers no rights" |
| chrisfewtrell | Asp.Net User |
| Re: Problems with Application Code and Controls | 4/29/2005 8:57:05 PM |
0 | |
| |
| mbund | Asp.Net User |
| Re: Problems with Application Code and Controls | 5/1/2005 11:02:53 PM |
0 | |
|
Chris,
Let me answer for Baiju. When we designed VSO5, we made a decision not to support the ASP.NET 1.1 model in the IDE. You can run your 1.1 web app in the ASP.NET 2.0 compatibility mode during runtime, but it would have added unreasonable complexity to VS05 to have it support both the 1.1 and 2.0 compilation features.
So we provided a migration feature to convert web apps from 1.1 to 2.0. Our goal is minimize the amount of manual work needed to migrate your web app. But given the extensive 2.0 changes for web projects, it is expected some manual migration work will be needed. We will do everything reasonable to minimize this work.
We are even looking to automate the solution suggested in this forum thread. In addition, we are creating a white paper which will document this and other migration issues and their solutions. We will be sure to post a link to this on these forums when it is finished.
Thanks,
-Mike- |
| bstineman | Asp.Net User |
| Re: Problems with Application Code and Controls | 6/6/2005 6:57:17 PM |
0 | |
|
Pondered and played with this a bit more over and weekend and I've come to decide that I really don't care for this new build model (all the seperate DLL's). What it seems like to me is that its introduced a new namespace style heirarchy to the build process that isn't openly intuitive and sets up roadblocks to assembly cross referrences that isn't readily apparent to the basic developer.
I would really prefer to see a fix for this rather then hack-job style workarounds. Yes the new model helps force people into thinking a bit more carefully about how applications are designed/built, but it also throws some significant roadblocks into the development process and increases the learning curve for the product.
At a minimum, it would be nice to have an option for the old style assembly creation (one dll for the website). Thus allowing older applications to be more easily migrated forward while helping encourage the new build methodology for newer applications. At the very least, make sure this new build order is clearly details and readily accessible for all developers moving to VS 2005. |
| AJO | Asp.Net User |
| Re: Problems with Application Code and Controls | 9/12/2005 12:27:53 PM |
0 | |
|
I have read both of those pages. I understand the goals of the
'project-less' webs, but I also think MS have clumsily shot themself in
the foot by removing the option all together. Most complaints seem to
be coming from people who (like us) have highly modular websites with
large collections of server controls and lots of custom classes for the
various types of controls to inherit.
I think the best solution would be some sort of hybrid project -- .cs
files should have the option of being pre-compiled in to a dll, exactly
as with VS2003, and maybe this could be controlled using a page
directive. App_Code isn't the answer because CodeFile="/App_Code/.."
causes a compile time error. App_Code is nothing more than a cheap
subsitute for a seperate business layer DLL which can incremental build
without any user input.
We can emulate the project based pre-compiled library, of course, but
then we lose the file associations between the ascx/aspx and the .cs
files and we get a rather large and unwelcome layer of file
administration to add to our procedures. Despite this, and despite the
annoyance it will certainly cause, it is more than likely the option we
will have to choose.
Currently, the VS2005 web projects are sub-standard and no where near
production ready. We are continuously getting random compile errors
that some class or other could not be found. A rebuild sometimes fixes
it, sometimes regenerates the same error, sometimes leads to another
class being unreachable. It is all down to way that these classes are
being compiled in to their 'temporary' libraries, and something
somewhere going wrong.
Quite simply, the code does not work. It is not a matter of misunderstanding.
|
| Baiju | Asp.Net User |
| Re: Problems with Application Code and Controls | 9/12/2005 10:48:24 PM |
0 | |
|
Yes, it is making things more complicated.
Please remeber that a code-behind accessing user control can be solved by <@Reference > Tag in the page. This abstarct base class is needed only when some stand alone code (in App_Code folder) accessing code-behind classes (outside App_Code).
"This posting is provided "AS IS" with no warranties, and confers no rights" |
|
| |
Free Download:
Books: Information Security Management Handbook Authors: Harold F. Tipton, Micki Krause, Pages: 0, Published: 2007 Grid-based Problem Solving Environments: IFIP TC2/WG 2.5 Working Conference on Grid-based Problem Solving Environments : Implications for Development and Deployment of Numerical Software, July 17-21, 2006, Prescott, Arizona, USA Authors: Patrick W. Gaffney, James C. T. Pool, IFIP Working Group 2.5--Mathematical Software, Pages: 460, Published: 2007 On the move to meaningful Internet systems 2003: OTM 2003 workshops : OTM confederated international workshops : HCI-SWWA, IPW, JTRES, WORM, WMS, and WSRM 2003, Catania, Sicily, November 3-7, 2003 : proceedings Authors: R. Meersman, Zahir Tari, Pages: 1071, Published: 2003 Auditing EDP Systems Authors: Donald A Watne, Peter B.B. Turney, Donald Watne, Pages: 0, Published: 2002 Multi-Agent Systems and Applications V: 5th International Central and Eastern European Conference on Multi-Agent Systems, CEEMAS 2007, Leipzig, Germany, September 25-27, 2007 : Proceedings Authors: Hans-Dieter Burkhard, Gabriela Lindemann, Rineke Verbrugge, Laszlo Z. Varga, Pages: 350, Published: 2007 Web:Problems with Application Code and Controls - ASP.NET Forums Problems with Application Code and Controls. Last post 12-01-2005 6:38 PM by ryan.reid. 21 replies. Sort Posts: Oldest to newest, Newest to oldest ... CodeProject: Docking ActiveX Controls: Principles and ... Aug 28, 2001 ... Besides the OLE part of control implementation, the main problem is to find the .... To be able to manage them from user application code, ... Solving Performance Problems in an ASP.NET application with ANTS ... Part of my caching strategy involved storing sitemap-like data in a singleton tree class at application start. Many controls then rendered themselves, ... Problems using application state with custom classes - ASP.NET General The problem comes in when I try to use the Application state from a custom ... Here is the code... Public Class _411Vars Inherits System.Web.UI.Page ... persist state of controls in a custom control, Teemu Keiski, ASP. ... Problems running application in Eclipse (IDEs, Version Control and ... Aha, so this is an Eclipse problem. We finally get to the bottom of it. Again, the error you are seeing is not because of your code. ... Could not find any resources appropriate for the specified culture ... data application block with asp.net- the timeout period elapsed prior to completion. ... problems with application code and controls ... CodeVerge.Net Programming Forums Net 3.5 ListView is one new databound control that is shipped with ASP. ... Some are very serious security problems, while others will simply crash the server ... request on the server. the status code returned from the server was: 500 ( 4904) ... runtime error r6034, an application has made an attempt to load the c ... Assembly Version Management - ng.asp-net-forum.migrating_from_asp ... web application project model versus website project model and migrating to 3.5 ยท problems with application code and controls ... Trap Ctrl+Alt+Del - borland.public.delphi.nativeapi.win32 What about using Windows Policies to control things like that instead of ... >OS and cannot be overwritten in application code. A low-level keyboard hook ... ModalPopup + Validation = JavaScript Error - asp.net_ajax.asp ... Code 0. Page: <%@ Control Language="vb" AutoEventWireup="false" ..... problems with emitting javascript with partial rendering rendering & update panels ... Videos: Coconut: COde CONstructing User Tool Google Tech Talks
March, 7 2008
ABSTRACT
Coconut is a developing system for high-assurance, high-performance
software. It was used to ... HITBSecConf2006 Malaysia : Marc Schonefeld - Pentesting Java/J2EE Presentation Title: Pentesting Java/J2EE - Discovering Remote Holes
Presentation Details:
Java/J2EE is a widely used industry standard for ... Learning Defect Predictors from Static Code Attributes ... Google Tech Talks
October 29, 2008
ABSTRACT
For six years, I have worked on learning quality predictors from NASA data. Based on that ... Igor Roman - Logging For Fun And Proffit Perl Programming Talks at YAPC::Braga
When debugging a problem in an application, people generally resort to scattered print's throughout the ... Using Grok to Walk Like a Duck PyCon 2008 Talk by
Mr. Brandon C Rhodes (Georgia Tech)
Grok provides tools for general-purpose application design. Reuse in Python often ... |
|
|
|