Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old July 19th, 2007, 07:33 AM
Authorized User
 
Join Date: May 2007
Location: moeskroen, henegauwen, Belgium.
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to swifty_programmer
Default ASP.NET Web Application

Hi,
I'm a 23 years old .NET Software Engineer.

I've been migrating a existing ASP.NET Website to a ASP.NET Web Application.
I know you can NOT use the App_Code dir of the Web Site in a Web Application. So I want to copy all my helper classes to a new Class Library Project: CompName.AppName.WebUtilities in te same solution.
Till here no problem, copy the files, add the references...
The problem is that one of those classes is my PageBase (in web-project I do: WebForm1: PageBase), in that PageBase I use several controls, one of those control is the UpdatePanel (AJAX). When I build my project the compiler complains:

Error 1 The type or namespace name 'UpdatePanel' could not be found (are you missing a using directive or an assembly reference?)

I allready tried adding the AjaxControlToolKit.dll to the references whitouth success.
Can someone help me asap plz?

thx a lot,

Lawrence

PS: any good and easy understanding links about Differences between Web Site and Web Application Model are welkom too!


  #2 (permalink)  
Old July 19th, 2007, 07:59 AM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

hi there.. beside adding the ajax dll to your project (for the control toolkit) you have to install ajax 1.0 from microsoft (the update panel is not in the control toolkit, or you are using a version from more than a year ago).. and beside that you have to add several things to the web.config file (that are specified in ajax.asp.net)...
is all this is meet, we can try to trace your problem in another way, but the error is clearly pointing that you don't have the updatepanel installed (in any form, or at least not registered)...

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========
  #3 (permalink)  
Old July 19th, 2007, 08:39 AM
Authorized User
 
Join Date: May 2007
Location: moeskroen, henegauwen, Belgium.
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to swifty_programmer
Default

Indeed, and thanks a lot for your quick help.
The problem is, Ajax IS installed correctly (I use latest CTF) and all other Solutions with AJAX work fine.
Even stranger, the original web site I'm migrating from uses AJAX and it's working fine too. I just simply made a new project in that SAME solution copied the files from the web site project to the web application project. Then I rightclicked on the new made project and clicked on "Convert to WebApplication" (that makes the second file for the forms). Then I added the needed references to the project and compiled. Then I Saw you could not use those classes in the App_Code (with the convertion it turns into a simpel folder called "Old_App_Code" automaticly) So I made a new Class Library Project and copied the files from the Old_App_Code to the new project. And the problem occurs in that new Class Library Project I called "WebUtilities". That's where he cannot find the UpdatePanel (I assume because it's a Class Library Project and not a WebSite or a Web Application project).
Knowing that AJAX is installed an works great in an other project in same solution, what could possibly be the problem with that Class Library Project "WebUtilities" ?

  #4 (permalink)  
Old July 19th, 2007, 08:46 AM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

you are not using ajax 1.0?? anyway.. I never understand the difference between web app project and web site, so I just stick with sites... I hate having multiples files that doesn't do anything useful...
I understand right and you are using your controlpanel from codebehind?? or your pages are in another folder?? did you add all the references to your class library too???

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========
  #5 (permalink)  
Old July 19th, 2007, 10:28 AM
Authorized User
 
Join Date: May 2007
Location: moeskroen, henegauwen, Belgium.
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to swifty_programmer
Default

I checked for all above, it's all OK.
I must be overseeing something...
I don't have the choice my assignment is to migrate to Web App.

a few links off the 2 models:

forums.asp.net/p/988775/1279716.aspx#1279716

http://mjhutchinson.com/journal/2007...project_models

For migration of WebSite to WebApp
http://webproject.scottgu.com/CSharp...igration2.aspx

What a problem, no one seems to be able to help me. Why does MS don't just Use ONE model... I must admit the WepApp has more of an project approach than WebSite, they are little bit easier to program if you come from WinForms.

Grtz all
  #6 (permalink)  
Old July 19th, 2007, 12:23 PM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

thanks for the info.. but you didn't answer my question.. if you updatepanel on a page or somewhere in code behind???

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========
  #7 (permalink)  
Old July 19th, 2007, 02:54 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Quote:
quote:Originally posted by gbianchi
 I hate having multiples files that doesn't do anything useful...

What "multiple" files aren't useful?

-Peter
  #8 (permalink)  
Old July 19th, 2007, 03:04 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Gonzalo,

MS started ASP.NET 2.0 with just the website model to eliminate the whole dependency on IIS but got so much flak from the developer community that they had to re-create the web project model. I, for one, much prefer a project based model as it makes working with web apps or libraries or win apps or console app much more consistent.

Lawrence,

ASP.NET 2.0 automatically compiles any CS files in the App_Code directory. If the web app conversion process left the files in there, you would get class instantiation problems because the classes would be compiled in both the main project DLL (precompiled) as well as the assembly dynamically compiled at runtime from the files present in the app_code folder.

Just because the directory is called "old_app_code" doesn't mean the code doesn't get compiled. You could have a folder called "please_do_not_compile" and as long as the files in it are items in the web app project file they will compile. I believe the various descriptions of web app projects and certainly Scott Guthrie's conversion instructions explain some if not all of this.

The easy solution may be to put the files you moved to the second project back in the main project and see if it all works. From your error message, you are missing a reference to the ajax library. Yes they may be installed, but your second project might be missing a reference to them.

-Peter
  #9 (permalink)  
Old July 19th, 2007, 03:07 PM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

well.. you have the plain page file (aspx), the code behind file (.vb) and another one (designer.vb) that has nothing more than a couple of variable declaration.. not usefull.. also always have to deploy compiled and in my case that work with different people in several locations is awfull... I stick with site designs...

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========
  #10 (permalink)  
Old July 19th, 2007, 03:15 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Gonzalo,

I see your point about "useless" files in the Application Projects. Once I discovered the new web site model, I quickly switched over. However, I also noticed that the WAP model has a number of advantages.

For starters, having to compile the app brings some advantages. No longer can a developer make a quick change to some code in a file on a production server, only to get overwritten by the next update. The WAP model allows you to more formalize the deployment process.

Also, the WAP model seems to blend in with source control systems a lot better. In the web site model, Visual Studio has a habit of including everything it sees in the web site folder, including the Bin folder and other stuff. By using the WAP model, it's much easier to determine what files to include or exclude.

Where I work, we're slowly switching back to the new old WAP model again....

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.




Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET Web Application Administration dcct84 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 7 September 24th, 2007 04:28 PM
performance tuning of asp.net web application swati_joshi ASP.NET 1.0 and 1.1 Basics 3 July 24th, 2006 09:42 AM
can't open asp.net web application project phyzie C# 3 September 26th, 2005 11:40 AM
Convert ASP web application to ASP.NET Steve777 ASP.NET 1.0 and 1.1 Basics 3 June 2nd, 2005 07:26 AM
RAISERROR on my ASP.NET Web Application ozzy SQL Server 2000 3 April 17th, 2005 11:29 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.