본문 바로가기

ASP.NET

(6)
error CS1061: 'int' does not contain a definition for 'ToList' and no extension method 'ToList' accepting a first argument of type 'int' could be found (are you missing a using directive or an assembly reference?) error CS1061: 'int' does not contain a definition for 'ToList' and no extension method 'ToList' accepting a first argument of type 'int' could be found (are you missing a using directive or an assembly reference?) 1. 원인 entoty framework 에 매핑 한 stored procedure 가 model 을 제대로 생성 할 수 없을때 발생하는 오류입니다.1-1. 예sp 내부에 #TEMP 테이블 join이나 select 가 있으며 list 로 가져올 컬럼을 매핑 할 수 없을 때 발생합니다. 즉, var onbidObjectList =..
asp.net mvc ajax post 500 error javascript var formCollection = $("#frmUser").serialize(); $.post("/UserInfo/ValidateUser", formCollection, function (status, textStatus, jqXHR) { if (status.Success) { alert("OK"); } else { alert("FAIL"); } }); controller [HttpPost]public JsonResult ValidateUser(FormCollection formValues){ JsonResult result = new JsonResult(); stirng param1 = formValues["param1"]; stirng param2 = formValues["pa..
bundle 403 error bundles.Add(new StyleBundle("~/Content/css").Include( "~/Content/css/Kcommon.css", "~/Content/css/Kmain.css", "~/Content/css/Ksub.css", "~/Content/css/Kboard.css")); ~/Content -> ~/bundles 로 변경 bundles.Add(new StyleBundle("~/bundles/css").Include( "~/Content/css/Kcommon.css", "~/Content/css/Kmain.css", "~/Content/css/Ksub.css", "~/Content/css/Kboard.css"));
[ASP.NET MVC] Make sure that the controller has a parameterless public constructor 유발소스 ASP.NET MVC /Controller/FileController.cs public string storageRoot { get; set; } public FileController() { storageRoot = Server.MapPath("~/App_Data/Upload"); } public FileController(ServerPathProvider pathProvider) { storageRoot = pathProvider.MapPath(); } public string DoSomething(string path1, string path2, string filename) { return StorageRoot + "\\" + path1 + "\\" + path2 + "\\" + file..
Upgrading mvc4 to mvc5 in vs2013 mvc4 -> mvc 5.2.3.0nuget package manager > asp.net mvc인스톨 되어 있으면 솔루션 탐색기 참조에서 System.Mvc 의 버전 체크 4.0.0.0 이면 System.Web.Mvc 참조 삭제 후 해당 솔루션 밖 패키지 폴더에서패키지 폴더 > Microsoft.AspNet.Mvc.5.2.3 > lib > net45 > System.Web.Mvc.dll 참조 추가 NuGet Package Console 창에서 Install-Package -Id Microsoft.AspNet.WebHelpers Install-Package Microsoft.AspNet.Web.Optimization Install-Package Microsoft.AspNet.WebPages.Data In..
C# Override Object Equals /*** * Excerpted from "Test Drive ASP.NET MVC", * published by The Pragmatic Bookshelf. * Copyrights apply to this code. It may not be used to create training material, * courses, books, articles, and the like. Contact us if you are in doubt. * We make no guarantees that this code is fit for any purpose. * Visit http://www.pragmaticprogrammer.com/titles/jmasp for more book information. ***/ usin..