UpdatePanel & Form View in Web Site Project vs. Web Application Project

I am seeing two different behavour patters when using the UpdatePanel in a Web Application Project (File > Add New Project > ASP.NET AJAX-Enabled Web Application) vs a Web Site Project (File > New Website > ASP.NET AJAX-Enabled Web Site)

The exact same code will complie in one project type but not in another.

The code is:

<

asp:FormView ID="FormView1" runat="server">

  <EditItemTemplate>

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">

      <ContentTemplate>

        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>

      </ContentTemplate>

    </asp:UpdatePanel>

  </EditItemTemplate>

  <InsertItemTemplate>

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">

      <ContentTemplate>

        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>

      </ContentTemplate>

    </asp:UpdatePanel>

  </InsertItemTemplate>

</asp:FormView>

If you have this code in a single page Web Application Project it will complie and run just fine. However if you have this code in a Web Site Project it will not complete. It complains that you have already declared Label1 in this class. SInce Label1 is inside two different FormView templates this should complie.

Does anyone know a resolution for this other than converting to using Web Application Projects instead of Web Site Projects?

Thanks In Advance
Martin

p.s. Using most recient System.Web.Extensions downalod (1.0.61025.0)

 


Martin
0
martinmcnally
5/10/2007 11:59:09 PM
asp.net.ajax-discussion 13973 articles. 1 followers. Follow

1 Replies
1463 Views

Similar Articles

[PageSpeed] 41

Nevermind. The Web Application Project does not complete the aspx file so it does not fail until you try to run the code.

I guess its another issue as to why the UpdatePanel forces you to rename your controls differently within each template of the formview control.

Martin


Martin
0
martinmcnally
5/11/2007 12:59:35 AM
Reply:

Similar Artilces:

Web Application Projects vs. Web Site Project- Where is Copy Project?
I have opted to use the Web App Project in 2005 (The 2003 Model)http://msdn2.microsoft.com/en-us/asp.net/aa336618.aspxWhy is the copy project missing when this model is used? It was there in 2003?Thank you,Patrick http://www.SURFThru.com   SURFThru.com I wanted to bump this topic again to see if any Microsoft techs had any input on this item.SURFThru.com...

Ajax error calling Web Service from Web Application Project vs Web Site
I am implementing the code from the Asp.Net Ajax Video Demo “How Do I: Make Client-Side Network Callbacks with ASP.NET AJAX?”  The Web page is generating a javascript error (‘SimpleService’ is undefined) and is unable to recognize the Web service.  The downloaded examples work, however I have created the Demo (both the page and the web service) in a Web Application Project, rather than a Web Site.  The demo uses a Web site.  Because of this the page does not recognize the Web service. To ask the question another way: What needs to be done differently in a Web Service...

VS 2005 SP1 + .NET AJAX => automatically adds web.config in nested Web Application Project when opening project or solution
I get a 'Configuration Error' on an aspx page because VS added automatically a web.config to my nested Web Application Project where no web.config file should be. This effect I have noticed since I have installed SP1 and .NET AJAX Extensions. Why is VS 2005 adding the web.config file and how can I disable this behavior? Following is the content of the automatically added web.config file (comments omitted): <?xml version="1.0"?><configuration>    <appSettings/>    <connectionStrings/>    <system.web> &...

Which is best web application projects or Web site projects in VS 2008
Hi, Using VS.NET 2008 We are developing a web based product (inventory, accounts,etc). This product has DA, BO layers. We are currently using web site project model. We are using webdelopyemnt project for deploying at client place.I want to know that, which model Web site model or web applicaton model is a best model for applications?I read most of the blogs and also articles for knowing difference between these two models.  But I am not coming under conclusion.Let me know your views and alos best answers Regards S. Muhilan   As you probably know, the difference between...

Migrating from VS 2005 Web Site Projects to VS 2005 Web Application Projects witn vb and c# code
I've tring to migrate Web Site to Web Aplication in VS 2005. In my Web Site I have pages written using VB and C#. During converting to WA i choose VB and only pages with VB code i can migrate. If I choose C# as language for WA only pages with C# I can migrate. Is a way to migrate Web Site with mix of VB and C# code? Wieslaw Hi, As far as I know, The ASP.NET Web application doesn't support that C# application project contains VB page or VB application project contains C# page. But it can compile the different language class file in project. In your case, you can tr...

VS 2005 Web Application project >> Web Site project
Hello,I am trying to do the uncommon, change a VS 2005 Web Application project (originally a converted 2003 Web Application project) to a VS 2005 Web Site project. There are many tutorials on how to either take a 2003 Web Application project, or 2005 Web Site project and turn them into into a VS 2005 Web Application project. (Not what I'm looking for)Also, is it possible to convert a 2003 Web Application project to a 2005 Web Site project. (too late for my current projects.... but for future refernce) Many thanx     There may very well be a reason why the road o...

Web Application Project/Web Site Project
Hello, I have some couple of questions... 1) How do I know a particular application already built in asp.net is "Web Application Project" or "Web Site Project" ?2) Also I have a application built in ASP.NET and If I open the source code in VS2005, Its giving a message saying this application is built in old version and it should be converted into new version before even using. So should I migrate the application to "Web Application Project" or "Web Site Project" ? . kindly advise..(Note: This application is NOT very big or complex.) Thanks in Advance..Renil. 1)A web application pro...

Web Site Project and Web Application Project
I hope someone can help me out with this question.I have been using Web Application Projects and like what it can offer because I am so used to how VS 2003 was structured. I am trying to teach someone the difference between Web Site Projects and Web Application Projects, but haven't been able to figure out how to create a new solution that is specific to the Web Site Project structure anymore. I thought when I installed Web Application Projects, I would have the option to switch back and forth between Web Site Projects and Web Application Projects. Is there something I am overlooking when I ...

Web Site Project or Web Application Project?
Hi all, I have a situation here.  My team's project has window and web clients, and we used Team System to control Source Code. We have a contract company that develop the generated codes for some of the web pages that being used in the web client.  They built it using Web Site Project.  We still need to develop some other web pages that has different functionalities than the code generator and one of our team member created a project which is a Web Application Project.  Now, the code generator doesn't work because it won't compile in our Web Application Pro...

how to tell the project type in .NET? Difference between web application & web site?
Hi, I wonder how can I tell the .NET project type if I got the solution code. Is there any configuration for the project type like: ASP.NET web application, ASP.NET web service application, windows application etc. And is the web site actually a web application project in .NET? Just not clear about the basic concept.   thanks, Hi, in ASP.NET 1.x (visual studio 2002 - 2003) they were real projects but that changed with the initial release of Visual studio 2005 when the concept of website came up. After a while, and quite a lot of asking, Microsoft released the web application pr...

web app vs web site vs web project
Could someone describe the differences between web sites, web apps and web projects? (or send me a link that contains this comparison?). Is one of these terms synonomous with another? What are the advantages/disadvantages of each?  How does one choose when starting new development? Can one type be converted into another?     Thank you. Here is my definition: Website: perspective of users. Collection of web pages.Webapp and project: perspective of developer (and webmasters). Collection of web pages and resouces (database, code, etc.). Maybe software installers...

Web Application Projects & Web Deployment Projects
What is the difference between both? I can't find the answer! thanks Hi, A Web Application Project (WAP) is simply another project model aprt from the default Website Model in VS 2005. WAP is similar to VS 2003 web project model. http://webproject.scottgu.com Whereas a Web Deployment Project(WDP) is used to deploy a web project and provides flexiblity while deployment. See this link for details: http://weblogs.asp.net/scottgu/archive/2005/11/06/429723.aspx Hope this helps, VivekSocial Networking Platform in ASP.NET || Join now: CodeASP.NET Community Please mark the most helpful repl...

Difference between Web Site Project, and Web Application Project?
Hi - can anyone please explain, in simple terms, what the difference is between a Web Site Project, and a Web Application Project? I've read Scotts blog at http://webproject.scottgu.com/VisualBasic/Migration/Migration.aspx - but am none the wiser. I'm about to upgrade from VS2003 to VS2005 - and don't want to waste a lot of time upgrading existing 2003 web apps to 2005 web site projects, if web application projects are more appropriate. Thanks for any guidance, Mark Hi.I have exactly the same question, and can't find any information about it.Can anyone help us?Sérgio Also i...

Converting a Web Site Project to a Web Application Project ?
I upgraded my .NET 1.1 apps to Web Site Projects long before this add on was released and was wondering if there's  a way to convert these Web Site Projects to Web Application Projects because I really did like the old way of just uploading one dll to the web server when updates came around.   Is there a way to do this?In this world there are 10 types of people, those that know binary and those who don't. Here are a couple of tutorials that describe how to do this: C# - http://webproject.scottgu.com/CSharp/Migration2/Migration2.aspx VB - http://webproject.scottgu.com/VisualBa...

Web resources about - UpdatePanel & Form View in Web Site Project vs. Web Application Project - asp.net.ajax-discussion

Newest 'internet-explorer-11' Questions - Stack Overflow
current community chat blog Stack Overflow Meta Stack Overflow Stack Overflow Careers your communities Sign up or log in to customize your list. ...

Calendar of Events - St Paul the Apostle Primary, Winston Hills
... Paul the Apostle is a two-stream Catholic parish school in Winston Hills, catering for boys and girls from Kindergarten to Year 6. Hidden UpdatePanel, ...

Drink of the Week - Logicum
Logicum It's Logical to share Menu Skip to content Home Contests Food Recipes Drink of the Week Health Technology Sports Space World Day Weapons ...

Advert-Rotator™ Rotate any type of ad, advert or banner - Welcome
NEW : Google Adsense™ in AJAX Updatepanel - Rotate any type of advertisement on your website. Whether it is Google Adsense™, Flash video or banner, ...

dotnet HighCharts inside UpdatePanel
Read my article about the HighCharts.net databind? A frequently question regards the possibility to get functioning a dotnet.HighCharts chart ...

Blog Archive
Blog Archive 2013 75 Essential Tools for iOS Developers Aug 15 2013 posted in iOS Speaking at Cocoa Conf PDX Jul 13 2013 posted in Speaking In ...

ASP.NET AJAX and jQuery Presentation
... the following demo Visual Studio 2008 projects: ASP.NET AJAX and jQuery Demo Illustrates how to use ASP.NET AJAX (ScriptManager, UpdatePanel, ...

Latest Updates
Latest Updates - Free source code and tutorials for Software developers and Architects.; Updated: 15 Feb 2013

New Release of WatirMaker now WatirRecorder
Rutger Smit & Scott Hanselman have released a new version of WatirMaker, now retitled WatirRecorder. This is a great program for building UI ...

Work smarter: MS AJAX’s JavaScript type extensions
Examples of using Array.contains, Date.format, String.format, and other base type extensions to accelerate ASP.NET AJAX client side development. ...

Resources last updated: 1/23/2016 2:03:55 PM