Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem importing a project
Message
From
31/08/2012 19:27:47
 
General information
Forum:
ASP.NET
Category:
Visual Studio
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01552146
Message ID:
01552200
Views:
42
Whil Hentzen said years ago, "If it's easy for the user, it's hard for the developer". You can set a data annotation for the minimum date, but it won't affect the data picker AT ALL. If you want to limit the selectable dates in the date picker, you need to code it into the javascript. Go with what works.

As for the CDN issue, perhaps it's a different version than what you have locally. It's going to make it faster for the user, but probably not significantly.

>I have about 15 sites in IE opened right now with all the stuff I was googling and trying to figure out. I have more than 40 sites opened in Chrome also with all the questions / problems I've been working today on. I made some progress with the project, but not much.
>
>For instance, here is my most recent problem I'm trying to figure out:
>
>If I have my _layout.cshtml like this:
>
> <title>@ViewBag.Title</title>
>
>    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" type="text/javascript"></script>
>    <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/jquery-ui.min.js" type="text/javascript"></script>
>    <script src="http://modernizr.com/downloads/modernizr.js" type="text/javascript"></script>
>  <script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.min.js")" type="text/javascript"></script>
>    @*    <script scr="http://ajax.aspnetcdn.com/ajax/mvc/3.0/jquery.unobtrusive-ajax.min.js" type="text/javascript"></script>*@
>    <link href="@Url.Content("~/Content/themes/base/jquery.ui.all.css")" rel="stylesheet" type="text/css" />
>
>
>date seems to work Ok even in IE9 now and also the Ajax style seems to be working for my Index.chtml. If I comment the first one out and try to use the one from CDN, the Ajax style stops working, although date seems to still work in IE9, which is good.
>
>So, all these minor things and trying to figure out all the sites and googling like mad take a lot of time. Hopefully I'll slow down the pace of questions while getting more familiarity and practice.
>
>I still didn't get a good answer of how to make some sort of generic annotation. Say, am I even thinking in the right direction with trying to set FutureDateOnly annotation in the model and have it somehow automatically set MinDate in Date Picker?
>
>And all these things. Say, I included DataAnnotations library from NuGet to be able to set [EMail] attribute in the model and automatically have it reflected in the view.
>
>Since I am still a newbie in ASP.NET MVC development I have 1000 questions to answer and solve.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform