[ASP.NET] 잠재적 위험이 있는 Request.Form 값을 발견했습니다.
클라이언트 ( )에서 잠재적 위험이 있는 Request.Form 값을 발견했습니다. 사용 중인 .NET 프레임워크 버전이 4.0이라면 web.config 에 아래 코드를 넣어주는 것으로 해결이 가능합니다. <system.web> <httpRuntime […]
클라이언트 ( )에서 잠재적 위험이 있는 Request.Form 값을 발견했습니다. 사용 중인 .NET 프레임워크 버전이 4.0이라면 web.config 에 아래 코드를 넣어주는 것으로 해결이 가능합니다. <system.web> <httpRuntime […]
C# Abstract Keyword.
//요일구하기 public static string GetDay(string FLI_DAY) { string tempGetDay = string.Empty; switch (FLI_DAY) { case “MO”: tempGetDay = “월”; break; case “TU”: tempGetDay = “화”; […]
XmlDocument doc = new XmlDocument(); doc.LoadXml(xmlPSW5); XmlNodeList node = doc.GetElementsByTagName(“ETR_INF”); for (int i = 0; i < node.Count; i++) { //attribute 추가 XmlAttribute newAttribute = […]
참조 : http://stackoverflow.com/questions/4791794/client-to-send-soap-request-and-received-respons
______________C# sample________________
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 |
using System; using System.Collections.Generic; using System.Xml; using System.Xml.Xsl; using System.Xml.XPath; using System.IO; - 중간 생략 - public XmlElement ...... { XmlDocument docXml = new XmlDocument(); XslCompiledTransform xslt = new XslCompiledTransform(); StringWriter stringWriter = new StringWriter(); docXml = new XmlDocument(); docXml.PreserveWhitespace = false; docXml.LoadXml(resultXML); xslt.Load(Server.MapPath("XSLTDefault.xslt")); xslt.Transform(docXml, null, stringWriter); docXml.LoadXml(stringWriter.ToString()); return docXml.DocumentElement; } |
두 날짜 비교해서 달수 구하기따로 함수가 없어 만들었는데. 문제는 달마다 마지막 일이 다르다는것=> MS에서도 모호해서 함수를 만들지 않은 것 같음
대문자 2글자 추출
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 |
using System; using System.Text.RegularExpressions; class Program { static void Main() { // Part 1: the input string. string input = "abcABC1234567ㅏㅣ"; // Part 2: call Regex.Match. Match match = Regex.Match(input, @"[A-Z]{2}", RegexOptions.IgnoreCase); // Part 3: check the Match for Success. if (match.Success) { // Part 4: get the Group value and display it. string key = match.Groups[0].Value; Console.WriteLine(key); } } } //AB |
다음은 숫자만 추출할때 쓰면 된다. 반드시 숫자가 하나이상 있어야 됨.
1 2 3 4 5 6 7 |
using System.Text.RegularExpressions;</code> string strText = "abc1234567ㅏㅣ" string strNum = ""; strNum = Regex.Replace(strText, @"\D", ""); |
=> 1234567 닷넷 정규식에서 \d는 숫자. \D는 숫자가 아닌 문자를 […]
c# – Append XML string block to existing XmlDocument – Stack Overflow.
Copyright © 2024 | WordPress Theme by MH Themes