Why can I not use Asp.Net DataAnnotation Validation with VS 2008 - asp.net

I have a problem. I am developing Asp.Net MVC2 Application with VS2008 very well, but now I want to use the amazing DataAnnotion Validation shipping with Microsoft.MVC.DataAnnotation.dll. I can't find the DLL so I found it on the project Site # http://aspnet.codeplex.com/releases/view/24471#DownloadId=61772
I can't compile the Project. Is it a VS 2010 or .Net 4.0 thing ? Do I need VS 2010 or is there a way to use it within VS2008 ?
Thanks a lot guys, sorry about my bad English ;)

You don't need VS2010, you can use Data Annotations with VS2008 and .net 3.5
The example above actually works in VS2008. I just verified it.
Also the dll you mentioned above is the wrong dll for MVC2, instead of Microsoft.MVC.DataAnnotation.dll, you want System.ComponentModel.DataAnnotations which should be part of .net 3.5.

follow this guide: http://stephenwalther.com/blog/archive/2008/09/10/asp-net-mvc-tip-43-use-data-annotation-validators.aspx
maybe you just need to service pack your vs

Related

How to create a .Net version 2.0 website using Visual Studio 2012?

I have created a website using Visual Studio 2012. It is working just fine. The problem is I have to deploy it on a server that has .Net Framework 2.0 only. So I created another website using Visual Studio 2012 and set its version to 2.0. After copying the code of just a single page I tried to run it. But I am getting the errors "Unknown server tag asp:ScriptManager" and "Unknown server tag asp:UpdatePanel". I need them both as I have to use PageMethods in my page. How can I create a .Net Framework 2.0 website with ScriptManager and UpdatePanel without any error? Thanks in advance.
You didn't have to recreate your project. Go to the project settings, application, then change the "Target Framework".
To clearly answer your question, the answer is : you can't.
As Jamie Keeling suggested, Script Manager and Update Panel came with .Net Framework version 3.5.
You will have to find other components or some kind of workaround.
You might have to install ASP.NET 2.0 AJAX Extensions 1.0 if you are planning to use scriptmanager and update panel in .NET 2.0. Prior to .NET 3.5, Ajax was available as a separate library.

modify project in asp.net 1.1 in vs 2010

i have a project that is developed in asp.net 1.1. But i have vs 2010 installed...can i modify,debug and deploy from vs 2010...
ASP.NET 1.1 is not supported with VS 2010. So, if you want to debug and deploy, you will need to at least convert it to 2.0+
http://msdn.microsoft.com/en-us/magazine/ff956194.aspx
This will probably break some things like relative links in your existing project.
yes you can modify , debug, deploye your project in VS2010.

Asp to Aspx .net 4.0

can anyone tell me how to convert ASP project to asp.net web application.
I tried this url but was not able to convert it.
http://www.asp101.com/articles/paolo/asp2aspnet/default.asp
I am trying to convert asp application to .net 4.0 web application.
thanks in advance.
There is a tool provided by Microsoft to do such thing.
Anywyay, you might not be fully .Net 4.0 compatible at the end, you certainly will have to correct some issues manually.
http://www.asp.net/downloads/archived-v11/migration-assistants/asp-to-aspnet
unfortunately, in my experience, there is no easy way to migrate from 1 to the other, its a case of buying visual studio and creating a asp.net 4.0 solution in this context. then creating the functionality in the project
im sure this is NOT what you wanted to hear :(

ASP.NET 4.0 and VS2008?

Will VS2008 be able to develop ASP.NET 4.0 applications when it is released?
I would hate to have to go buy VS2010 just for a couple of features I'm looking forward two like Dynamic Data and session profiles.
You can develop .NET applications without Visual Studio at all, so you could use Visual Studio 2008 as a helpful tool in that regard but looking at the previous Visual Studio releases, it's very unlikely that you'll get first class support for .NET 4.0 features. Personally, I think the short answer to your question is "No."
By the way, ASP.NET Dynamic Data is already available in .NET Framework 3.5 SP1 and VS2008 supports it.
No, you will require Visual Studio 2010.
It may in theory be possible to do some hacks with MSBuild like there was for .NET 1.1 from VS2005 but it'll be completely unsupported, your intellisense wont work right, etc.
You don't need to buy VS2010, you can just download the free Express versions, likw with previous releases.

Can you make a site with ASP.NET MVC Framework using .NET 2.0?

Is it possible to make a site with ASP.NET MVC Framework using .NET 2.0? I am limited to using .NET 2.0 (we use VS 2008, but we have to use the 2.0 Framework) and I really want to try out the MVC Framework.
Scott Hanselman described a way to make it work, with some caveats, in his blog:
Deploying ASP.NET MVC on ASP.NET 2.0
It can be done using Visual Studio 2008, but it can cause headaches...
Create an ASP.NET MVC Web Application
Set Project Target Framework to 2.0
in Project Properties
Add a references to System.Web.MVC (click through warning messages)
Add any additional references you may need (System.Web.Routing, System.Web.Abstractions) again clicking through any warning messages
Start coding!
Not everything you try will work, if you see errors like this on deployment it means that whatever you are doing isn't supported by the 2.0 framework...
"The type or namespace name 'var' could not be found (are you missing a using directive or an assembly reference?)"
Configure your IIS to support MVC Routes and extensions
Copy "C:\windows\assembly\GAC_MSIL\System.Core" from the .NET 3.5 development framework to the /bin folder of the IIS Server running .NET 2.0 SP1.
Much of this can be found in a lot more detail on Scott Hanselman's blog

Resources