Install-Package UpgradeMvc3ToMvc4
http://nugetmusthaves.com/Package/UpgradeMvc3ToMvc4
Hope this help you !
http://nugetmusthaves.com/Package/UpgradeMvc3ToMvc4
Hope this help you !
public class MyViewModel
{
public SelectList employeeList {get;set;}
}
You'll need to refactor your model to do it a different way if this is the cause. So using anIEnumerable<SelectListItem>
and writing an extension method that
creates the drop down list with the different property definitions:
public class MyViewModel
{
public IEnumerable<SelectListItem> employeeList { get; set; }
}
Perfect solution !
DefaultIfEmpty
is used for left joins for EntityFramework 4+var query = from u in context.Users
from a in context.Addresses
.Where(x => u.Primary2Address == x.AddressiD)
.DefaultIfEmpty()
from s in context.States
.Where(x => a.Address2State == x.StateID)
.DefaultIfEmpty()
from c in context.Countries
.Where(x => a.CountryID == x.CountryID)
.DefaultIfEmpty()
select u.UserName;
@Model.LeadDate.ToString("dd-MMM-yyyy")
@Model.LeadDate.ToString("MM/dd/yy")
It will result in following format,26-Sep-2013
10/26/13
routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // Route Pattern new { controller = "Home", action = "Index", id =
UrlParameter.Optional } //Default values for parameters );
routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // Route Pattern new { controller = "Home", action = "Index", id =
UrlParameter.Optional },//Default values for parameters new { id = @"\d+" } //Restriction for id );Now for this route, routing engine will consider only those URLs which have only numeric id like as http://abc.com/Admin/Product/1 else it will considers that url is not matched with this route.
<div class="questions">
<div class="myDiv"> Question</div>
<div class="
myDiv
"> Question</div>
<div class="
myDiv
"> Question</div>
<div class="
myDiv
"> Question</div>
<div class="
myDiv
"> Question</div>
<div class="
myDiv
"> Question</div>
</div>
first div : $("div.questions > div:first").css("color", "red");
3rd div : $("div.questions > div:nth-child(3)").css("color", "red");
3rd last div : $("div.questions >
div::nth-last-child(3)").css
("color", "red");
last div : $("div.questions > div:last").css("color", "red");
even div : $("div.questions > div:even").css("color", "red");
odd div : $("div.questions > div:odd").css("color", "red");
ViewEngines.Engines.Clear();
ViewEngines.Engines.Add(
new
RazorViewEngine());