Definition Supports the rendering of HTML controls in a view. BeginForm & EndForm @{ Html.BeginForm("WhiteIpRequest", "Login", FormMethod.Post); } @{ Html.EndForm(); } TextBox @{ Html.BeginForm("WhiteIpRequest", "Login", FormMethod.Post); } @Html.TextBox("ip_address", (Object)ViewBag.ClientIp) @{ Html.EndForm(); }
DisplayMeasurement(-4); // Output: Measured value is -4; out of an acceptable range. DisplayMeasurement(50); // Output: Measured value is 50. DisplayMeasurement(132); // Output: Measured value is 132; out of an acceptable range. void DisplayMeasurement(int measurement) { switch (measurement) { case 100: Console.WriteLine($"Measured value is {measurement}; out of an acceptable range."..

Controller.View Method VS Controller.RedirectToAction Method View() 와 RedirectToAction() 메소드 모두 화면을 전환 한다는 기능적 측면에서는 동일한다. 하지만 View()는 동일한 Controller 내에서만 화면 전환이 가능하고 RedirectToAction()는 Controller와 상관없이 화면 전환이 가능한다. 측 동일한 Controller 에서의 화면 전환 이라면 View()를 사용하고 그렇치 않다면 RedirectToAction()를 사용하면 된다.
enum Season { Spring, Summer, Autumn, Winter } enum ErrorCode : ushort { None = 0, Unknown = 1, ConnectionLost = 100, OutlierReading = 200 } enum 과 switch 문 활용 예) public enum WhiteIpRequestState { NoRequest = 0, Requested = 1, Approved = 2, Rejected = 3 } WhiteIpRequestState whiteIpRequestState = ... switch(whiteIpRequestState) { case WhiteIpRequestState.NoRequest: case WhiteIpRequestState.Rejec..

📌ViewBag Gets the dynamic view data dictionary. Property Value Object The dynamic view data dictionary. // in Controller public ActionResult Index() { List colors = new List(); colors.Add("red"); colors.Add("green"); colors.Add("blue"); ViewBag.ListColors = colors; //colors is List ViewBag.DateNow = DateTime.Now; ViewBag.Name = "Hajan"; ViewBag.Age = 25; return View(); } // in View 📌ViewData Get..

IActionFilter ? action의 실행과 관련된 필터입니다. OnActionExcuted ? "action"을 실행한 후 "action" 결과 전에 호출됩니다. OnActionExcuting ? 모델 바인딩이 완료된 후 "action"이 실행되기 전에 호출됩니다. 활용 1) public class ActionFilter : ActionFilterAttribute { public override void OnActionExecuting(ActionExecutingContext filterContext) { // 로그인 여부 체크 및 권한 체크와 같은 다양한 로직을 적용 할 수 있다. // filterContext.Result = new RedirectResult(Url); var controlle..
List names = new List() { "John", "Anna", "Monica" }; var result = String.Join(", ", names.ToArray()); var combined = String.Join(",", new String[]{"a","b"}); // a,b List names = new List() { "John", "Anna", "Monica" }; var result = String.Join(", ", names.ToArray()); using System.Linq string.Join(",", people.Select(x => x.surname))
List 객체에 특정 값이 존재하는지 Where을 사용하여 확인 하는 예제입니다. var isThereEmptyValueInSkuNo = warehouseOutScanningInfo.Where(valueCheck => string.IsNullOrWhiteSpace(valueCheck.sku_no)); if (isThereEmptyValueInSkuNo.Count() > 0) { // 메세지 }
#if (DEBUG && !MYTEST) Console.WriteLine("DEBUG is defined"); #elif (!DEBUG && MYTEST) Console.WriteLine("MYTEST is defined"); #elif (DEBUG && MYTEST) Console.WriteLine("DEBUG and MYTEST are defined"); #else Console.WriteLine("DEBUG and MYTEST are not defined"); #endif
- Total
- Today
- Yesterday
- .submit()
- jstl(java standard tag library)-core
- 스프링 프레임워크(spring framework)
- 스프링 프레임워크(spring framewordk)
- System.Diagnostics
- 메이븐(maven)
- java.sql
- java web-mvc
- In App Purchase
- 표현 언어(expression language)
- 인텔리제이(intellij)
- 스프링 시큐리티(spring security)
- MainActor
- REST API
- 특정 문자를 기준으로 자르기
- React
- docker
- jsp 오픈 소스
- nl2br
- jstl(java standard tag library)
- 람다식(lambda expression)
- await
- system.io
- 제품 등록
- 문자 자르기
- 진수 변환
- java-개발 환경 설정하기
- 스프링 시큐리티(spring security)-http basic 인증
- java 키워드 정리
- error-java
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |