Author: 관리자

Front-End

[HTML] Radio버튼 체크값 가져오기

< ul>                      < li style=”float:left; width:130%;”>        < label class=”subject3″>구분         @Html.RadioButton(“DisplayFlag”, 1, new { @class = “radio”, @id = “radio1”, @checked = “checked” })        < label class=”normal” for=”radio1″>영어< /label>      ...
C#

[.net mvc] 파일명, 파일확장자만 가져오기

[HttpPost] public ActionResult SaveFiles(IEnumerable< HttpPostedFileBase > files){            if (files!= null)             {                foreach (var file in files)                 {                       Path.GetExtension(file.FileName); // 파일 확장자만 가져오기...
Java

HttpPostedFileBase를 바이트(Bytes[]) 로 변환

BinaryReader 클래스를 사용하여 쉽게 변환이 가능하다. public static byte[] ConverToBytes(HttpPostedFileBase file) {             //방법 1             var length = file.InputStream.Length;             byte[] arrayData = null;             using (var binaryReader = new BinaryReader(file.InputStream))             {            ...