Why does visual studio 2008 break my web page? - ajax

I have a aspx page that has a UpdatePanel and a asp timer. the timer tick is the trigger for the update panel.
If add anything to the update panel (even a space!) Visual Studio automagically adds the following
<Triggers>
<System.Web.UI.AsyncPostBackTrigger ControlID="tm1" EventName="Tick"></System.Web.UI.AsyncPostBackTrigger>
</Triggers>
Even though the page has already registered the following (albeit in the same triggers section)
<Triggers>
<asp:AsyncPostBackTrigger ControlID="tm1" EventName="Tick" /> </Triggers>
So my questions are these
1) What is the difference between asp:AsyncPostBackTrigger and System.Web.UI.AsyncPostBackTrigger
2) Why does Visual Studio persist on adding this line which then breaks the page as it errors with the message System.Web.UI.UpdatePanelTriggerCollection must have items of type 'System.Web.UI.UpdatePanelTrigger'. 'System.Web.UI.AsyncPostBackTrigger' is of type 'System.Web.UI.HtmlControls.HtmlGenericControl'.
3) How can I stop this???
I am using Visual Studio 2008 targeting a .Net 2.0 Web application project.

Do you have the AJAX control library registered correctly for your project? Since you're targeting .Net 2.0, you'll need to add the AJAX library explicitly (it's not built in until .Net 3.5).

Related

How to update OData WCF in Visual Studio 2017?

Trying to update Service Reference in an existing project, I got an error that says,
The specified OData API cannot be updated because OData APIs are now only supported with Connected Services.
The aka link (http://aka.ms/odatavsclientguidance) leads to http://odata.github.io/odata.net/#OData-Client-Code-Generation-Tool.
There is no instruction for VS 2017.
The instruction below leads me to the OData Connected Serve VS extension.
(https://marketplace.visualstudio.com/items?itemName=laylaliu.ODataConnectedService)
And it appears that extension cannot be installed in VS 2017.
Scroll to the bottom of the extension description page, we will see all the questions about its VS 2017 version.
So the question: is that OData extension the only to update OData Service in VS 2017? What walk around do we have?
The official Visual Studio Marketplace code generation tool, which you refer to in your post, now supports Visual Studio 2017.
One notable difference from how one would normally go about setting up OData references is that where one would previously use Visual Studio's "Add Service Reference" directly to generate the relevant code, installing the tool adds a "Add Connected Service" instead.
See also the discussion in this GitHub issue.
In your Solution Explorer, right click on References, Add Connected Service then select Microsoft WCF Web Service Reference Provider, you'll get a Wizard-like window to add a Service Reference just like in VS2015.
Refer to https://learn.microsoft.com/en-us/dotnet/core/additional-tools/wcf-web-service-reference-guide
Images at https://imgur.com/a/6kYhexK

Add Deployable Dependencies - missing MVC checkbox

I am trying to use the new Add Deployable Dependencies feature of VS 2010 SP1 to help with deploying an MVC3 site to a shared hosting environment. However, when I select the option after right-clicking on the project, the resulting dialog box does not show the ASP.NET MVC checkbox. It only shows Asp.Net Web Pages with Razor Syntax and SQL Server Compact.
Another thing I noticed is the capitalization of Asp.Net does not match screenshots I've seen online. In the "About Microsoft Visual Studio" dialog box, my version is shown as 10.0.31118.1 SP1Rel.
I'm stumped. Any help would be greatly appreciated. Thanks!
Solution
I re-installed VS 2010 SP1 (via the Web Platform Installer) and I now have the ASP.NET MVC checkbox and the capitalization seems correct. In the "About Microsoft Visual Studio" dialog box, my version now shows as 10.0.40219.1 SP1Rel... I must've still had the beta. Thanks!
Was the project actually created as an Mvc project? If not you will have to add the Mvc project type GUID to the csproj file. Also make sure you actually have Mvc installed on your machine.

Unable to debug MVC source code in Visual Studio 2010

I'm trying to debug MVC source code in Visual Studio 2010 using the Microsoft Symbols Server. I've configured Debugging options as seen below:
and my project is targeting .NET Framework 4.0. (as said in Debug .NET Framework's source code only shows disassembly in Visual Studio 2010)
When I try to load the symbols of System.Web.MVC.dll, some window pops up saying that they're being loaded. But in the end, the Modules window says they couldn't be found, call stack lines are still grayed out and I only get code from disassembly window.
Anyone knows what is happening?
Microsoft has not provided symbols/source code for the entire .NET framework via their symbol server. However MVC is opened source so you can seperately download the MVC source from Microsoft: http://aspnet.codeplex.com/releases/view/58781

In visual studio 2008 all Items in toolbox are grayed out

All my controls are grayed out in the toolbox when I open a Winform Project.
I have already reinstalled VS2008 and tryed all the steps indicated here, but nothing:
http://social.msdn.microsoft.com/Forums/en-US/vssetup/thread/8db82810-bffd-4d07-8e50-029d2a26f7be/
If it can be related when reinstalling VS2008 I had problems with the installation of .net Framework 3.5, it was complaining about .NET 2.0SP1 missing.
I solved it installing .net Framework 3.5 SP1 and then VS2008.
At the moment I'm trying to install .NET Framework 2.0SP1 but it doesn't work: the set up stops and shows "set up error" that's it. I don't know if the issues are related.
Start from scratch and try again (starting with .NET 2.0)
.NET 2.0 (followed by SP1)
.NET 3.0 (don't remember if this is necessary before 3.5 or not)
.NET 3.5
Visual Studio 2008
I just had the same problem and resolved it by deleting *.tbd files in this folder:
C:\Users\<username>\AppData\Local\Microsoft\VCSExpress\<version>
open a package in the BID. Then the control flow items will show up. all other items(eg data flow tak) will be greyed out
Drag a control flow item. For eg, if you drag a data flow task, then edit it. Now the toolbox will show Data Flow destinations and transformations. This means, BID will show control flow items if the control flow tab is active. then you can drag a control flow items and edit it to add any task based on the control flow task you added

How to maintain scroll position after postback in web application created in visual studio 2003

Is there a way to maintain scroll position after a postback in visual studio 2003.
In visual studio 2005 I can achieve this by setting MaintainScrollPositionOnPostback attribute of page directive to true.
How can I do this without setting location.href property???
If you are in the 1.1 Framework, you're looking for SmartNavigation. It's deprecated for the MaintainScrollPositionOnPostback in 2.0. Don't get your hopes up, it's mediocre at best. :)
SmartNavigation will work for you. It is available in .Net 1.1.

Resources